google-apps-scriptgoogle-sheetssidebar

google spreadsheet sidebar setWidth not working


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


Solution

  • 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.

    SetWidth Deprecated