Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

google spreadsheet sidebar setWidth not working

Tags:

Anybody else having trouble with the setWidth function? The example here is "300", but if you change the number, the sidebar is the same width. I've tried a few times on a clean spreadsheet.

https://developers.google.com/apps-script/guides/dialogs#custom_sidebars

like image 665
jason Avatar asked Mar 05 '14 04:03

jason


People also ask

How do I open the sidebar in Google Sheets?

Click the 'My New Menu' and select the menu item 'My sidebar 1' to display the sidebar. Now your custom sidebar will show up at the right-hand side of your google sheet with the text and the button we added (as shown below). When you click the button, the sidebar will be closed.

What is Sidebar in Google Sheets?

A sidebar can display an HTML service user interface inside a Google Docs, Forms, Slides, or Sheets editor. Sidebars do not suspend the server-side script while the dialog is open. The client-side component can make asynchronous calls to the server-side script using the google.


1 Answers

Google Scripts now ignore the setWidth() method and the sidebar width is now fixed at 300px. From the release notes:

In Google Docs and Forms, sidebars now ignore the setWidth() method; they cannot be changed from the default width of 300px. This change was applied to the new version of Sheets in the previous week's release.

like image 158
Amit Agarwal Avatar answered Sep 29 '22 10:09

Amit Agarwal