Hide Menu Bar in Google Sheets using App Script - google-apps-script

I wanted to hide the menu bar in the Google Sheet I created (I am the owner of the file) to the specified editors using App Script. Would that be possible?
I did the "?rm=minimal" trick in the URL but the app script I created for some parts aren't working.
Thanks for your help!
I am expecting it to hide the menu/tool bars placed in the top view of sheets.

Related

Google Sheets script : Click on menu item

I'd like to have a script that simply clicks on File > Download > PDF of a Google Sheets menu.
To simplify, I first tried to have the script click on "File".
With devtools I could determine that this menu item has id="docs-file-menu" so my function should look like :
document.getElementById('docs-file-menu').click();
But it doesn't work because document is not defined.
While searching for a solution, I understood that Apps scripts cannot interact with the browser, but I'm not quite sure whether that includes the sheets menus items as well?
Is there any way to make a script click on a menu item?
If not possible, is there any other way to make the "download as pdf" window appear?

image click on mobile inside the sheets app

I have a custom script that runs when i click an image i insert in a google spreadsheet ... everything is working on non-touch devices ... but on mobile, inside the sheets app, it does no trigger the function ... it just selects the image
am i doing anything wrong here?
are google script supposed to work inside the sheets app? if not i really do no see the point of using them
link is not the solution, custom menus also do not appear on the sheets app ... i am literally left without any idea to try out
thanks
As far as I know Google Apps Script runs only on Desktop computer and that too only when Script is allowed to run on your browser. For most part Google Apps Script is same as JavaScript. I have tried to run them on Android phones but without any success.

How to share a google spreadsheet that contains google app script?

I followed the tutorial at google developer web site to create a spreadsheet. And as expected when I reloaded the spreadsheet, a menu called "Bracket Maker" is now available on the menu bar.
But if I share this document to my friends, they can open this document, see all the content in the document. But they just don't have the "Bracket Maker" menu bar. How should I do to make sure they also get the script capability?
The menu is created when the onOpen is triggered.
How are you creating the menu - using the onOpen function or an installed trigger ?
If you created it using an installable trigger, then your friends have to set up the trigger manually.

Aligning google aps script gadget on google page

I've create a google apps script chart which looks fine when I run publish > deploy > Test web app for your latest code.
However, once it's inserted as script gadget on a page of a google site, I can't modify its horizontal alignment:
clicking the left/center/right icon to modify alignment of the script gadget while editing the page in google site does nothing
I've tried deploying the app as UiApp.createApplication() as-is and then within a horizontal panel with various settings of HorizontalAlignment: nothing changes.
Creating charts with google apps script is easy enough, but aligning the results on a google page is frustrating.
uiApp = UiApp.createApplication().setTitle('TheTitle').add( chart );
var hpanel = uiApp.createHorizontalPanel()
hpanel.add(chart).setHorizontalAlignment(UiApp.HorizontalAlignment.LEFT)
uiApp.add(hpanel);
return uiApp;
Try changing the width of the hpanel to like var hpanel = uiApp.createHorizontalPanel().setWidth(800) and you may notice the alignment change then.

How to dynamically change the spreadsheet of a Google site page?

I've checked this issue and now I know (with getHtmlContent and setHtmlContent) how to create a webapp that :
a) takes into account the active user id
b) selects accordingly the right spreadsheet to be displaid
c) adapts a Google site page with the selected spreadsheet
But my problem is that I want to dynamically adapt the page when the user clicks the link to it (from navigation area). How can I trigger my webapp ?
Thanks for the help !
I don't think it is possible to invoke scripts from links in the Navigation area. But it is definitely possible to invoke an Apps Script on a link in the content area of a Google Sites page.
You can consider invoking your script from such a link