JavaScript Functions, Parameters - Google Apps Script - Array Method Series Part 3

  Рет қаралды 36,329

Learn Google Sheets & Excel Spreadsheets

Learn Google Sheets & Excel Spreadsheets

Күн бұрын

Пікірлер: 33
@giamar3026
@giamar3026 5 жыл бұрын
Hola,thank you very much!!! you are a gigant teacher and your videos are very usefull, even if english is not aour languages, you are very clear on your explanations. Thank you again, i love your videos. Marina
@christiamdariascastilla8362
@christiamdariascastilla8362 3 жыл бұрын
With this canal I'll going to learn english and google spreadsheets. I can & I hope. Thank you buddy.
@ExcelGoogleSheets
@ExcelGoogleSheets 3 жыл бұрын
Good to hear.
@johanvandervorst
@johanvandervorst 5 жыл бұрын
I'm learning a lot from you, keep the video's coming!
@lazalazarevic6192
@lazalazarevic6192 5 жыл бұрын
I was looking forward to this! Thanks a lot.
@KhalilYasser
@KhalilYasser 5 жыл бұрын
Thanks a lot for great and awesome videos
@thiagodecastroartiga8893
@thiagodecastroartiga8893 2 жыл бұрын
man you keep saving my life
@angadrangar5512
@angadrangar5512 4 жыл бұрын
you are awesome!!! thank you so much!
@walterpaiva719
@walterpaiva719 5 жыл бұрын
Thanks for the video!!
@paulloup5210
@paulloup5210 5 жыл бұрын
Thank you very much !!!
@dmsmcc1408
@dmsmcc1408 2 жыл бұрын
While I had encounter problem in returning date Range data with getRange function. Please need your guidance
@phoenixempire8886
@phoenixempire8886 4 жыл бұрын
🙏🏻
@BlokeBritish
@BlokeBritish 2 жыл бұрын
i need to allow users to write to my sheet through a script but users should not be able to view/open the sheet manually. the script needs to capture current user email. is this possible ?
@WijnandHBles
@WijnandHBles 5 жыл бұрын
TKS a good video
@tazulislam2698
@tazulislam2698 2 жыл бұрын
Thanks! I am finding this. Brother, how to POST 2dimensional array to google sheet using web app api? Thanks agsin.
@apolovzla_ccs
@apolovzla_ccs 5 жыл бұрын
What a great video. I have learned a lot with your videos and explanations. I have a doubt, and would appreciate your response. Is there a way to select all spreadsheet in a folder and apply actions to all of them? I mean, let suppose I create 20 spreadsheets using a script and i need to set them up in certain ways but only by using one script: create the same amount of sheets, protect the same ranges, insert the same values. Is there any way to group all the created spreadsheets and work all of them at the same time? I know i could create a master spreadsheet and duplicate many times as i need, but what about if i need to work on files created already? I can get the url, or the id and work with it, but can i work on them all the same time? Let say i define a variable called allsheets, and it will contain all the id or url, how can i do that using a script? Thanks in advance for your response.
@xemoable
@xemoable 5 жыл бұрын
1- Create an array with all the sheet tab names in it, lets say "sheetsNames = ["salesTab", "inventoryTab", "sheet3"]" 2- use a For statement "for (var name in sheetsNames) { var each = ss.getSheetByName(sheetsNames[name]); // Freeze 1st row in every sheet in the array each.setFrozenRows(1); }"
@apolovzla_ccs
@apolovzla_ccs 5 жыл бұрын
@@xemoable thanks a lot for your response. It has been very, very helpful. I am learning JavaScript and need to read a lot. If i get your response right, you set an array and use it in a... loop? Is that a loop? Am i right?
@xemoable
@xemoable 5 жыл бұрын
@@apolovzla_ccs you are welcome :) and yes a For loop is best for this situation . i am also learning appscript atm , i learnt JavaScript a while ago using a mobile app called "Solo Learn" along with many coding languages, very useful and convenient .
@apolovzla_ccs
@apolovzla_ccs 5 жыл бұрын
@@xemoable oh, thanks for that advise. I'll check for the app. Thanks a lot man.
@apolovzla_ccs
@apolovzla_ccs 5 жыл бұрын
@@xemoable i tested your suggestion, but i think there is a problem jejejejejeje The code works fine, but it is for sheets inside a spreadsheet (the file). I am trying to call all the spreadsheets in one folder. The command "ss.getSheetByName" refers to a sheet (or sheets) inside a spreadsheet. I've been searching for a way to active all the spreadsheets at once, but I think that's not possible. So, in this case, the solution should be create a template spreadsheet and duplicate as many times i need. This is a common mistake: if you look for a spreadsheet action, people will think about the sheets but sheets are contained inside the spreadsheet. I tried ".getName" and ".getURL" but this commands does not activate the spreadsheet, they only get the name or the URL. If you try the ".getActiveSpreadsheet", it won't work neither. Any other suggestion? :)
@vijaych4446
@vijaych4446 4 жыл бұрын
How can i call another script file function, please could you explain?
@allisonwaters9676
@allisonwaters9676 4 жыл бұрын
Hey! So I've been going through this following your lead, and when I get to around 11:00 min, my script looks just like yours as far as I can tell, but I still see addNumbers in my list of available functions. Is this because I'm "from the future" (LOL)? or do you suspect I'm doing something wrong? I have declared "addNumbers" as a var and assigned the function to that variable. I have also commented out the earlier version of the function where we used keyword function then typed the name of our function. Any thoughts? THANKS!!! - AW
@ExcelGoogleSheets
@ExcelGoogleSheets 4 жыл бұрын
haha! It's not because you're from the future You must be doing something wrong. Share you code.
@allisonwaters9676
@allisonwaters9676 4 жыл бұрын
@@ExcelGoogleSheets /* function test(){ var ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); var data = ss.getRange(1, 1, 4, 3).getValues(); Logger.log(data); var newarray = [ ["Linda",27, "Chicago"], ["Lisa",32, "Santa Fe"], ["Pete",31, "Newton"] ]; ss.getRange(1, 5, newarray.length, newarray[0].length).setValues(newarray); } */ //function addNumbers(x,y){ // return x + y; var addNumbers = function(x,y){ var z = x + y; return z; } function runAnotherFunction(){ var ss = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); var number = addNumbers(66,32); ss.getRange(8,2).setValue(number); } function myFunction() { //var names = ["Linda","Lisa","Peter","Joe"]; //var othernames = ["Jill","Bob"] //names[1] = "Ana"; //add last element //names.push("Steve"); //names.push("Olivia"); //add first element //names.unshift("Jake"); //remove last element //names.pop(); //remove first element //names.shift(); //var combinednames = names.concat(othernames); //var names = ["Linda","Lisa","Peter","Joe","Peter"]; //var position = names.indexOf("Peter",3); //var results = names.join(""); //var newarray = [ // ["Linda",27], // ["Lisa",32] // ]; //var newpeople = [ // ["Pete",22], // ]; //var results = newarray.concat(newpeople); // Logger.log(results); //newarray[0].push("Chicago"); //newarray[1].push("Los Angeles"); //newarray[1][1]=33; //newarray[0]=["Bob", 22, "New York"] }
@ronturnbull2786
@ronturnbull2786 2 жыл бұрын
Looks like they have changed the behavior of variables so that they appear as functions ... cause they basically are.
@aaakimov
@aaakimov 4 жыл бұрын
Hello, dear teacher, I have a problem with Array, it gives me error "Cannot convert Array to number 0.0"
@aaakimov
@aaakimov 4 жыл бұрын
I dont know why it has to convert data in the array. When I do LOG and check for the array, everything looks good. when i try to write array to a range via setValues(array) I see error above.
@denzycreations4848
@denzycreations4848 3 жыл бұрын
sir i need your help.
@denzycreations4848
@denzycreations4848 3 жыл бұрын
about the code. it is not working
@muraly3523
@muraly3523 Жыл бұрын
@@denzycreations4848 First just run the first function.(whatever the result be).Then run the second function(('runAnotherFunction')
JavaScript Arrays & Map Method Tutorial - Google Apps Script Part 4
26:53
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 54 М.
JavaScript Arrays - Programming Like a Grown Up - Google Sheets Apps Scripts - Array Methods Part 5
20:32
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 57 М.
From Small To Giant Pop Corn #katebrush #funny #shorts
00:17
Kate Brush
Рет қаралды 68 МЛН
HAH Chaos in the Bathroom 🚽✨ Smart Tools for the Throne 😜
00:49
123 GO! Kevin
Рет қаралды 14 МЛН
JavaScript indexOf, lastIndexOf Methods Tutorial - Google Sheets Apps Scripts - Array Methods Part 6
20:31
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 32 М.
JavaScript Filter Method Tutorial - Google Sheets Apps Scripts - Array Methods Part 7
27:19
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 71 М.
App Script Tutorial - Google Sheets - For Loops, Looping Through Cells, Variables, Comments - Part 2
24:17
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 225 М.
JavaScript 2 Dimensional Arrays, Reading & Writing Array To and From  Ranges - Part 2 -  Apps Script
22:28
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 52 М.
Using doGet(e) Function to start Web App on Google Apps Script
15:48
Code With Curt
Рет қаралды 26 М.
Javascript Functions & Parameters | Javascript Tutorial For Beginners
14:27
How to Get The Last Row - Google Sheets Apps Scripts - Array Methods Part 10
24:34
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 63 М.