make cells mandatory to fill in google sheets with javascript - javascript

I am new to programming. Is there a way of making a cell mandatory to be filled in google sheets or microsoft excel using javascript, where by a message pops up to remind users to fill in the cells.

Related

Google sheet script to assign action items (Ctrl+Alt+M)

I am trying to automate action items assignments in google sheets.
At the moment it is manual process. Our google sheets have section with two columns:
One column with reviewer names and emails
Another column with sign off (completion) dates
Managers have to go through many “sign off” cells one by one, press Ctrl+Alt+M to insert comment, enter corresponding reviewer’s email with plus symbol and some text
‘+John.Citizen#mycompany.com
Please review this sheet and blah-blah-blah’
JavaScript Range functions setNote or setCommet (https://developers.google.com/apps-script/reference/spreadsheet/range#setnotenote ) do not work for me.
Any idea how to assign using script or somehow simulate pressing (Ctrl+Alt+M) ?
Thank you
As #Patrick P says, there is no methods in Apps Script to interact with comments.
But go ahead and add a star next to the issue number here[1] to give it more visibility.
[1]https://issuetracker.google.com/36756650
With the Drive API you can create and manage comments and replies, they can be anchored to a position on the document, or unanchored which is just associated with the document.
Have a read at the documentation here:[2]
[2]https://developers.google.com/drive/api/v3/manage-comments

Send data to HTML website from google sheets

I have rows of data in google sheets and a HTML website which have text box to fill. Now I want to loop through the row in google sheets and pass it into the text box by HTML id, is it a possible thing to do? If so, please help me get some insights to do it. Thank you.

Setting a Google Sheets document cells to read-only

I am trying to find a way to protect a Google Sheets spreadsheet document from being modified by the owner. In other words, I want to make the cells of my Google Sheets spreadsheet to be read-only.
How can I create a script, assigned to a button, that would accomplish this?
Specifically, I need two features:
1) Make the sheet read-only.
2) Modify a specific cell, then make the sheet read-only again.
I'm not sure if you mean you, as the owner of the sheet, are unable to edit it or if everyone except you is unable to edit it.
Either way, go to the Data menu and click 'Protected sheets and ranges'. In the sidebar, click 'add a range', add a description if you like, choose 'range' from 'range/sheet', add the cell reference you wish to protect and:
If you want others to be unable to edit it:
Change permission drop down to 'Only me'
If you want to be unable to edit it:
Change permissions to 'Edit with warning'
(This is the best I can think of, because as the owner of the sheet, you cannot prevent yourself from editing cells, but this will alert you if you try change a cell you wish to protect)
Found Solution In this site.
Go to Data -> Protected Sheet & Ranges
https://www.howtogeek.com/412399/how-to-protect-cells-from-editing-in-google-sheets/

Submit Button on Google Sheets

I am working on a project where I must have daily inventory entered by multiple locations into Google Sheets. There are up to 85 potential entries so I chose to create it in a spreadsheet instead of Google Forms.
The question that I have is, after data is entered into the Google Sheet, can I add a submit button that will record the data into a Master Sheet so I may generate reports and record the data over time?
Thank you in advance.
Short answer
Yes, it's possible.
Explanation
Google Sheets could be extended by using Google Apps Scripts. You could insert an image and assign a script to it but also you could use custom menus, dialogs, side bars and triggers.
Reference
Extending Google Sheets

Google Script equivalent of Excel VBA Refedit

I'm trying to replicate some Excel VBA in Google Script. I want to prompt the user to input a range from a Google Spreadsheet. Is there a script equivalent to refedit? I need them to input three ranges so I can't just use the currently selected range.
Thanks!
Theres no equivalent. You can ask them to select them one by one by selecting them in the spreadsheet, or make a dialog that asks the user to type them on text fields.

Categories