Is it possible to get one specific row and each cell of it as elements of an array. Getsheetvalues returns any row as a 1'st element of an array. I would like to get row values and parse them into doc template.
Thanks for your sharing. I really appreciate if you can help to explain the method for send email with condition on specific value, e.g. record indicate value from new row submission above certain setup, then the email will be sent. Please do help/ share link if you have any.. i try to browse from your playlist, but not able to find. Tq sir
I've shared a spreadsheets with my collaborators giving them permission to edit only some cells in particular sheets, so that each editor can edit only selected cells in his personal sheet, but can view the other sheets. The problem is that although sheets are protected each editor can anyway add new sheets. Is there a way to avoid it. Main problem is I don't want anyone to add any sheet in the shared spreadsheet.
Hi Kamal! Great question. As far as I know, as long as a user has edit access to the Spreadsheet, they will be able to create new sheets, regardless as to what preexisting cells are protected. One idea you could try to prevent new sheets from getting generated is to either display a pop up that says "Please don't create new sheets" that gets called from an INSERT_GRID changeType from an OnChange trigger. Or, in the same vein, use the onchange trigger to automatically delete the new sheet once it gets created. You could even combine both these strategies. First alert the user, then delete the sheet. Check out Episode 3.4 to learn more about the onchange trigger: ruclips.net/video/T5CXhJrYguk/видео.html
Hi Taimoor! Yes, you can describe your range in A1 notation as well. For instance, if you wanted the range from cells A1 to AQ6, you could write: sheet.getRange("A1:AQ6"); Also, to copy format, use the method copyFormatToRange(). For example, sourceRange.copyFormatToRange(destinationRange, 1, 33, 1, 1); For more info, look here: developers.google.com/apps-script/reference/spreadsheet/range#copyformattorangesheet-column-columnend-row-rowend
let's say var dataRange = sheet_detroit.getDataRange().getValues(); dataRange.shift(); .shift() will remove the first index of an array which in this case is the entire first row (the header) of data.
Hi Kunal! An easy way to generate random numbers is via the built-in Javascript Math object. The method Math.random() will return a random number between 0 and 0.9999.... But this can be scaled and shifted using standard multiplication and addition operators. Finally, using the method Math.floor() will remove the decimal values from off the number so you're just left with a whole number. The following logic is how I would proceed: const lastRow = sheet.getLastRow(); const lastColumn = sheet.getLastColumn(); let randRow = Math.floor((Math.random() * lastRow) + 1); let randColumn = Math.floor((Math.random() * lastColumn) + 1); let randCellValue = sheet.getRange(randRow, randColumn).getValue();
@@DavidWeissProgramming Sir your reply and time highly appreciate, working great! very much enjoying your video and learning for us, blessing David to you....
This course is awesome !! I just discovered it, but I find your lessons clear and very well explained. Thank you so much for sharing your videos and the time and effort you put in making them.
how do you get it to show the helper text when you start typing the code? Is this an option I can turn on?
Bro, this course is so awsome! It really helps a lot!
Hugely appreciate! So happy I found this. Just checked out all catalogue. Prolific! Already subbed and about to start consuming.
Is it possible to get one specific row and each cell of it as elements of an array.
Getsheetvalues returns any row as a 1'st element of an array.
I would like to get row values and parse them into doc template.
Thank you so much for this tutorial!, I finally get it, I'll keep watching the rest of the tutorial!
Thank you! Keep me updated on your progress!
How do I setValues without knowing how large the range has to be?
how to get range from specific value define?
Thanks for your sharing. I really appreciate if you can help to explain the method for send email with condition on specific value, e.g. record indicate value from new row submission above certain setup, then the email will be sent. Please do help/ share link if you have any.. i try to browse from your playlist, but not able to find. Tq sir
Awesome video!
I've shared a spreadsheets with my collaborators giving them permission to edit only some cells in particular sheets, so that each editor can edit only selected cells in his personal sheet, but can view the other sheets. The problem is that although sheets are protected each editor can anyway add new sheets. Is there a way to avoid it. Main problem is I don't want anyone to add any sheet in the shared spreadsheet.
Hi Kamal! Great question. As far as I know, as long as a user has edit access to the Spreadsheet, they will be able to create new sheets, regardless as to what preexisting cells are protected. One idea you could try to prevent new sheets from getting generated is to either display a pop up that says "Please don't create new sheets" that gets called from an INSERT_GRID changeType from an OnChange trigger. Or, in the same vein, use the onchange trigger to automatically delete the new sheet once it gets created. You could even combine both these strategies. First alert the user, then delete the sheet. Check out Episode 3.4 to learn more about the onchange trigger: ruclips.net/video/T5CXhJrYguk/видео.html
thanks
more power. keep doing some tutorials. it helps so much.
Thanks man, you helped me a lot
can we use A B C?? columns names like A1 to AQ1
and how to copy formate also like
few of my column names are bold black and few are red bold
Hi Taimoor! Yes, you can describe your range in A1 notation as well. For instance, if you wanted the range from cells A1 to AQ6, you could write: sheet.getRange("A1:AQ6"); Also, to copy format, use the method copyFormatToRange(). For example, sourceRange.copyFormatToRange(destinationRange, 1, 33, 1, 1); For more info, look here: developers.google.com/apps-script/reference/spreadsheet/range#copyformattorangesheet-column-columnend-row-rowend
how to remove header row in (getDataRange) function
let's say
var dataRange = sheet_detroit.getDataRange().getValues();
dataRange.shift();
.shift() will remove the first index of an array which in this case is the entire first row (the header) of data.
@@Pshock13y thank 🙏sir
great, man! can you please help on how to get random cell value from column/Row using App script? thanks
Hi Kunal! An easy way to generate random numbers is via the built-in Javascript Math object. The method Math.random() will return a random number between 0 and 0.9999.... But this can be scaled and shifted using standard multiplication and addition operators. Finally, using the method Math.floor() will remove the decimal values from off the number so you're just left with a whole number. The following logic is how I would proceed:
const lastRow = sheet.getLastRow();
const lastColumn = sheet.getLastColumn();
let randRow = Math.floor((Math.random() * lastRow) + 1);
let randColumn = Math.floor((Math.random() * lastColumn) + 1);
let randCellValue = sheet.getRange(randRow, randColumn).getValue();
@@DavidWeissProgramming Sir your reply and time highly appreciate, working great! very much enjoying your video and learning for us, blessing David to you....
This course is awesome !! I just discovered it, but I find your lessons clear and very well explained. Thank you so much for sharing your videos and the time and effort you put in making them.