google-apps-script

Script inserted today's date into spreadsheet is wrong

我只是一个虾纸丫 提交于 2020-07-10 09:56:26
问题 I'm working on a bounded to spreadsheet script for a client, the spreadsheet is owned by them. Among other many things the script should insert today's date into a Google Sheets spreadsheet cell. The problem is that the inserted date is wrong and always the same. I made a copy of the spreadsheet to try to debug my code / find out what setting is wrong but I'm unable to reproduce the problem, like looking at and playing with the spreadsheet and script project timezone settings. This is the

Materialize grid s12 not working in mobile view or on Chrome's developer tools

被刻印的时光 ゝ 提交于 2020-07-10 09:48:27
问题 I am using materialize to do my styling and grid on the Google Web App that I am working on, but I cannot get the grid to work on mobile devices. I did put the code suggested on Materialize documentation on my section and as also suggested on this question materialize grid s12 not working in mobile view however it is not working for me. <meta name="viewport" content="width=device-width, initial-scale=1.0"> What could I be doing wrong? My full HTML is <!DOCTYPE html> <html> <head> <title

Materialize grid s12 not working in mobile view or on Chrome's developer tools

你说的曾经没有我的故事 提交于 2020-07-10 09:48:00
问题 I am using materialize to do my styling and grid on the Google Web App that I am working on, but I cannot get the grid to work on mobile devices. I did put the code suggested on Materialize documentation on my section and as also suggested on this question materialize grid s12 not working in mobile view however it is not working for me. <meta name="viewport" content="width=device-width, initial-scale=1.0"> What could I be doing wrong? My full HTML is <!DOCTYPE html> <html> <head> <title

Event trigger to move row to one of two other sheets based on values in 2 columns

ぃ、小莉子 提交于 2020-07-10 09:27:52
问题 Image of Spreadsheet I am fairly new to Google Apps Script and am needing some help. I have a spreadsheet entitled "Start" that has a "Received" column with a checkbox. I am able to move the row to another sheet if the checkbox is edited to be true but I need to add one more condition. If the Received column is edited to be true AND the Location is Store, I want to move the row to the Target1 sheet. If the Received column is edited to be true AND the Location is Area, I want to move the row

Event trigger to move row to one of two other sheets based on values in 2 columns

淺唱寂寞╮ 提交于 2020-07-10 09:24:26
问题 Image of Spreadsheet I am fairly new to Google Apps Script and am needing some help. I have a spreadsheet entitled "Start" that has a "Received" column with a checkbox. I am able to move the row to another sheet if the checkbox is edited to be true but I need to add one more condition. If the Received column is edited to be true AND the Location is Store, I want to move the row to the Target1 sheet. If the Received column is edited to be true AND the Location is Area, I want to move the row

Is there an example of the Classroom.Courses.Topics.get so I can call Classroom.Courses.CourseWork.create with an existing topicId?

做~自己de王妃 提交于 2020-07-10 08:35:46
问题 Our school is trying to move all coursework online. We have eight teachers adding content to one class, mostly manually rather than with a script. I have a javascript script that creates Coursework based on rows of a spreadsheet. If possible, I would like to have the topic as a string in each row of the spreadsheet of Coursework data, e.g. "Math Week 1", use Classroom.Courses.Topics.get to get the topic, then write the topicId from the topic into CourseWork. I found code on StackOverflow to

Google script change row color based on data change, sheet sorted

冷暖自知 提交于 2020-07-10 07:37:05
问题 Link to demo sheet I have a sheet which is sorted by column E. Values in column E can be duplicate, which means that several rows can have the same value in column E. Now I want to color rows which signify a change in column E. Here's the code that I've built based on some great answers on StackOverflow: function quicktest() { var spreadsheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Sheet1'); var rangeData = spreadsheet.getDataRange().getValues(); var lastRow = spreadsheet

How do I remove null values from an array within an array?

梦想的初衷 提交于 2020-07-10 07:34:09
问题 I am working with Google Sheets and Google Apps Scripting. I have used .getRange().getValues to grab user emails from a Sheet. Example Array Received: [[user1, , ], [user2, user3, ], [user4, user5, user6]] As you can see, I have a potential of up to three users per row (inner array). However, some of those cells are empty resulting in empty values in the array. I am then feeding each inner array into .addEditors() which throws an error due to the empty user. I know I can run through each

Google web app - Generate another html from default html file and carry value from default html to new html

北城以北 提交于 2020-07-10 07:32:35
问题 I need to ask the user to select a value and after that I want to generate a new html page which will display the selected value. Step1: the app generates a list of values and the user need to pick a value (I know how to do it and I used a simplified version for this test) Step2: Once the user click the value, a new html file is generated and the selected value will appear as a text (I do not know how to do this) The default html file is the following (f.html): <!DOCTYPE html> <html> <head>

Google web app - Generate another html from default html file and carry value from default html to new html

自作多情 提交于 2020-07-10 07:31:32
问题 I need to ask the user to select a value and after that I want to generate a new html page which will display the selected value. Step1: the app generates a list of values and the user need to pick a value (I know how to do it and I used a simplified version for this test) Step2: Once the user click the value, a new html file is generated and the selected value will appear as a text (I do not know how to do this) The default html file is the following (f.html): <!DOCTYPE html> <html> <head>