Тёмный

Google Sheets API - JavaScript NodeJS Tutorial 

Learn Google Sheets & Excel Spreadsheets
Подписаться 276 тыс.
Просмотров 115 тыс.
50% 1

Learn how to work with Google Sheets API & Google's NodeJS JavaScript library. In this tutorial we'll read & write data to our Google Sheets spreadsheet using our Node JS app.
Node JS Google Sheets API Tutorial - Part 1
#GoogleSheets #API

Опубликовано:

 

8 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 181   
@etiennesilvio
@etiennesilvio 6 месяцев назад
taking a minute to thank you for this video. Spent 2 days over the internet failing each and every time. In 30m of video, I got it to work !! thank you so much !
@dommarrone4859
@dommarrone4859 3 года назад
Great tutorial! Thanks so much! Could not figure out a few things with Google's confusing documentation. This is exactly what I needed.
@joydeepbhattacharjee5305
@joydeepbhattacharjee5305 3 года назад
This man so nicely explained the whole thing that I couldn't figure out when the 45 minute is over... Absolutely awesome...
@shupesmerga4694
@shupesmerga4694 Год назад
I don't know why I only got this now. I've been wrestling with Google Sheets API start up but once I got the response that I want from my sheet by following along. I smiled like a kid. Thanks man!
@ExcelGoogleSheets
@ExcelGoogleSheets Год назад
👍
@JoseLeMalin
@JoseLeMalin 3 года назад
Very helpful from the beginning until the end ! Thanks for the video!
@michi19935
@michi19935 2 года назад
That was very very helpful. This is the only video that explains how to pull and overwrite the data without these third party apps.
@ExcelGoogleSheets
@ExcelGoogleSheets 2 года назад
:)
@orestesom
@orestesom 3 года назад
You really know how to explain node js with google sheets! Congratulations and continue!
@arturog7205
@arturog7205 5 лет назад
As a JS novice I found your video extremely helpful and easy to follow as you explained every detaile so clearly. Thanks!
@serial.thrillers.productions
@serial.thrillers.productions 3 года назад
Awesome video! So helpful! One of the best JavaScript tutorials out there
@antonioparra5161
@antonioparra5161 4 года назад
Thanks for the tutorial. I searched a lot and all I found wasn't nearly as clear and simple as this. It worked like a charm!
@adetiamarhadi8774
@adetiamarhadi8774 3 года назад
this video really save my day! many thanks to you!
@martybrals9748
@martybrals9748 3 года назад
Thank you very much! I had no idea what i was doing, but it works anyway. Now I can try to find a way to get data from Shrimpy (or binance) and write it back to my Google Sheet. Very well explained and I hope to find more of your video's.
@vladislavstamenov5733
@vladislavstamenov5733 4 года назад
Exactly what I need it. A way to communicate with specific spreadsheet Thank you!
@elricho72
@elricho72 2 года назад
GREAT VIDEO !
@gabiparrello8100
@gabiparrello8100 4 года назад
Muuuuy bueno, gracias!! La parte de autenticación con JWT esta mucho más simple y práctica que como lo plantea la documentacion oficial de Google.
@kouachirenda3064
@kouachirenda3064 3 года назад
excellent tutorial thank you
@artemriyaka695
@artemriyaka695 2 года назад
Very helpful!! Thanks
@walterpaiva719
@walterpaiva719 5 лет назад
I really enjoy your videos, you help me out a lot!
@hiroyukinumaguchi1984
@hiroyukinumaguchi1984 Год назад
Great!
@t-damer
@t-damer 3 года назад
Thanks dude, u helped to solve my problem :)
@davidverano444
@davidverano444 2 года назад
Thanks. Finally I'm able to do it. It works.
@ExcelGoogleSheets
@ExcelGoogleSheets 2 года назад
👍
@drdoggystyle1
@drdoggystyle1 2 года назад
Great introduction!
@patrickm9953
@patrickm9953 4 года назад
Thanks for getting me started with Google Sheets
@PiyushKumar-cd4pl
@PiyushKumar-cd4pl 4 года назад
Sir, Your Tutorials are very helpful, thanks #learnGoogleSpreadsheets
@purplefan204
@purplefan204 3 года назад
Awesome video! Keep it coming!
@1211pankaj
@1211pankaj 4 года назад
Thank you, very well explained
@easterntornado
@easterntornado 3 года назад
Really an awesome video.
@remigoncalves1451
@remigoncalves1451 3 года назад
This is so so so helpful. Thanks a lot!
@jamestedesco1861
@jamestedesco1861 5 лет назад
Range related FYI: although I can't totally explain how it's the case, when entering the range, it only accepted the pure x/y sheet values without any "Data!" prefix allowed.
@ExcelGoogleSheets
@ExcelGoogleSheets 5 лет назад
It should be the name of your worksheet. If your worksheet is not called data you should match whatever it's called.
@susannasmith4475
@susannasmith4475 4 года назад
Thank you! I was having a problem parsing the data, but that worked!
@zachwhite8054
@zachwhite8054 4 года назад
@@susannasmith4475 same! thanks James
@AntonioSantos-ve6zv
@AntonioSantos-ve6zv 2 года назад
Clearly explained. Thank you!
@ExcelGoogleSheets
@ExcelGoogleSheets 2 года назад
Glad you liked it
@britt_joiner
@britt_joiner 2 года назад
This was incredibly helpful! Thank you so much!
@chooson8600
@chooson8600 3 года назад
wow thanks mate, you give free amazing lecture
@ExcelGoogleSheets
@ExcelGoogleSheets 3 года назад
Glad to hear that
@ffgcvs
@ffgcvs 4 года назад
Thank you for this tutorial!
@prelude0133
@prelude0133 5 лет назад
Nicely explained video. Love the live debugging
@fabricio_zm
@fabricio_zm 3 года назад
Thank you so much! Excelent tutorial!!!
@gabrielbessa2575
@gabrielbessa2575 4 года назад
great video
@justin0u0
@justin0u0 5 лет назад
Very nice explanation, helps a lot, thanks.
@elhananben8341
@elhananben8341 Год назад
Thank you very much!! Amazing!
@ExcelGoogleSheets
@ExcelGoogleSheets Год назад
👍
@lauraa.3593
@lauraa.3593 4 года назад
Excellent! Thank you!
@RGDreams
@RGDreams 2 года назад
Thank you. Working!
@srdjagunjic
@srdjagunjic 4 года назад
Thanks for this! My question is - how did you find that alternative way of connecting to the GSheet with keys.json if there is no documentation on it? I am interested in your thought process
@ExcelGoogleSheets
@ExcelGoogleSheets 4 года назад
Good question. I have no clue, just based on experience from other libraries and docs for other languages. Sometimes you'll find something in their docs for Python that is not listed in JS section and stuff like that. And then hopefully you can piece it together. You just try stuff and sometimes you make it work, other times you don't.
@srdjagunjic
@srdjagunjic 4 года назад
@@ExcelGoogleSheets Hmm seems interesting. Then it is based on experience, which must be acquired and not learned. Thanks for the reply and keep it up!
@ContraHacker1337
@ContraHacker1337 4 года назад
Worked perfectly. Thx.
@GrantBOlsen
@GrantBOlsen 4 года назад
Great video. How do I keep keys.json file safe in a web app?
@nicoletaungur7344
@nicoletaungur7344 4 года назад
I have the same question. I was trying to put them in .env, but it's not working
@shreyshreyansh
@shreyshreyansh 2 года назад
U r the man!!!
@ExcelGoogleSheets
@ExcelGoogleSheets 2 года назад
:)
@etristram
@etristram 4 года назад
Thanks for this great tutorial, I'm getting so much out of it. Just running into one snag: when I run the first several lines of code to test the connection, it doesn't log either 'Connected!' or the error.
@jaroblico
@jaroblico 3 года назад
UnhandledPromiseRejectionWarning: Error: Invalid Credentials -- Hi I'm getting this error when running the gsrun. Do you have any idea how to fix this?
@rauldobrasil
@rauldobrasil 3 года назад
i'm having the same trouble too
@borjapascual2693
@borjapascual2693 3 года назад
I am facing the same problem, ¿have you solved it?
@peteayresmusic
@peteayresmusic 2 года назад
Thanks so much! This worked very well.
@ExcelGoogleSheets
@ExcelGoogleSheets 2 года назад
Great to hear!
@ramitdour
@ramitdour 4 года назад
thanks a lot man, nice tutoriasl keep it up.
@mireiapalmero1972
@mireiapalmero1972 4 года назад
You are just awesome!
@theuseraccountname
@theuseraccountname 3 года назад
For the people watching now, for the range part, just take out the "Data!" from the beginning of the range to make it work for you.
@ExcelGoogleSheets
@ExcelGoogleSheets 3 года назад
Data! refers to the name of the worksheet. You should match it to your worksheet name. If your worksheet is called Sheet1, then you do Sheet1!A1:F30, instead of Data!A1:F30.
@recitoprasidha5761
@recitoprasidha5761 4 года назад
thanks this is really helpfull
@Ignbike
@Ignbike 5 лет назад
Hi men, this is amazing, you have a blog or something? Can you share the code?
@RubbingPotatoes
@RubbingPotatoes 4 месяца назад
@11:39 how do I download the file after creating a service account? For instance when I am running VS code on a second machine and don't have access to the keys JSON file?
@satishravipati3429
@satishravipati3429 4 года назад
Very nice video, just a quick question. 1. Can we be able to pull only the rows that were modified? 2. Can we get the first sheet automatically?
@LevinaI
@LevinaI 3 года назад
helpful!!
@alexisbrunet2707
@alexisbrunet2707 5 лет назад
thank you very, VERY much!!
@osherezra8460
@osherezra8460 3 года назад
Great tutorial just one question. how can you update a specific cell without hardcoding the range. because the sheets api doesn't send the cell range in the response
@drapala97
@drapala97 4 года назад
I have done exactly as instructed. The first time I had no problem at all, I connected to the API as you did. Now, for whatever reason, I am running the code and the only thing that appears in my terminal is "conectado!" because of this function: client.authorize(function(err){ if(err){ console.log(err); return } else { console.log('Conectado!') } }) ------ No syntax erros, no nothing. I have granted access from the sheets archive to the console.dev email I have created and yet, nothing is happening :( the full code I'm running is: const {google} = require('googleapis') const keys = require('./keys.json') const client = new google.auth.JWT( keys.client_email, null, keys.private_key, ['www.googleapis.com/auth/spreadsheets'] ) client.authorize(function(err){ if(err){ console.log(err); return } else { console.log('Conectado!') } }) async function gsrun(cl){ const gsapi = google.sheets({version:'v4', auth: cl}) const opt = { spreadsheetId: '*censored*', range: 'engenharia_de_software!B4:H27' } let data = await gsapi.spreadsheets.values.get(opt) let dataArray = data.data.values let newDataArray = dataArray.map(function(r){ r.push(r[0] + '-' + r [1]) return r; }); const updateOpt = { spreadsheetId: '18PfgKhFDFVyFQC49BVsxAvXdM_kL3L9neGJ2n23rtqE', range: 'engenharia_de_software!G4', valueInputOption: 'USER_ENTERED' resource: { values: newDataArray} }; let res = await gsapi.spreadsheets.values.update(uptadeOptions) console.log(res); }
@GauthamShankarKV
@GauthamShankarKV 4 года назад
Thank you!
@AbdelrahmanRefaat
@AbdelrahmanRefaat 3 года назад
How to send all sheets from within Excel in one go? And modification to the code let ws = excelFile.getWorksheet('subtotal'); range:'data!A2',
@artemriyaka695
@artemriyaka695 2 года назад
Hey, Thanks so much! I tried to run on web hosting and have an error when i connecting to Google sheet: "Error: error:02016002:system library:stat:No such file or directory" Did you test this app on live hosting?
@bethwickerson8134
@bethwickerson8134 Год назад
hi, any advice for error: "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential." The process for creating credentials in the google cloud console is a bit different now and I have tried a few different things but nothing works. Any help appreciated!
@stevenismart
@stevenismart Год назад
I got that error too :( . I am able to connect but once I try to get the data I get the error: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential appears
@stevenismart
@stevenismart Год назад
Ok so you are not going to use the json file from the API itself. You have to go to credentials->create credentials-O auth client ID. After you finished the Oauth2 stuff, you eventually get another .json file. Then you follow the guide for developers on google. developers.google.com/sheets/api/quickstart/nodejs?hl=en_US in the guide they rename the Oauth2 json file as credentials.json For the Oauth2 stuff I followed a youtube video called, How to create Google Oauth2 web application credentials in 2021 by DAIMTO Developer Tips But yeah, forget about the API json object from googlesheets api. In the documentation, there will be a file called token.json. That file gets autogenerated/altered after running the file the first time around, but you can create an empty token.json file just to feel better. Also putting the url and redirect uri in the Oauth2 client id screen can be annoying. For the javascript orgins url I just use the localhost:3000 link. If you run it without the uri, you'll get an error telling you what your uri should be so you go back and enter it and get a new json file. mine was just the localhost:3000/oauth2callback thing with the http in front. The first time you run the file, it will open the browser and ask you to sign into google. Doing that will fill out the token.json file so it doesn't ask again.
@bethwickerson8134
@bethwickerson8134 Год назад
@@stevenismart thank you so much! I will try this
@EsenEspinosa
@EsenEspinosa 4 года назад
What VC extension you have that reads the content of your required packages and does autocomplete on hover? (Great video btw)
@ExcelGoogleSheets
@ExcelGoogleSheets 4 года назад
I don't recall installing any extensions for that. Doesn't it do that automatically?
@ROBxCAL
@ROBxCAL 4 года назад
I keep getting this error: TypeError: Cannot read property 'data' of undefined Any reason why you think this is happening?
@cloud_architector
@cloud_architector 4 года назад
this is sheet name
@thomasboily6993
@thomasboily6993 3 года назад
Works when you change Data! for Sheet1!
@zicaroz
@zicaroz 4 года назад
I have some question can I get a cell style with value such as fill-color of cell ?
@buncheedev5469
@buncheedev5469 3 года назад
Thank you so much. How can i use delete row.
@GilbertMizrahi
@GilbertMizrahi Год назад
Great video. How will you create a workflow so that any user can get authenticated and select her own Google Sheets? Like having a button on a front-end app, where people click to authenticate themselves and then have a little form or something where they can enter the Google Sheet id. etc. I'm concerned about the authentication part. In your video, you generated an email that has to be used to share a Google Sheet, but I don't want to do that.
@ExcelGoogleSheets
@ExcelGoogleSheets Год назад
Use the actual example in Google Sheets API documentation to do that.
@v.doroshyn
@v.doroshyn 4 года назад
is there a way to get the font color and cell background color with JS? can`t figure it out for now
@aurelien_aep
@aurelien_aep 3 года назад
Great tutorial, However it looks like my code is not refreshed when I add/remove some data in my sheets ! Any tips ?
@rahulkumar-ig9gu
@rahulkumar-ig9gu 4 года назад
please also explain batchGetByDataFilter i want get filtered data by id . i have first column is id and want to get all data belong to similar id .
@shubhamjha5738
@shubhamjha5738 3 года назад
Kindly,you should put the link of installation video or whatever you refer to visit us in description
@Sksahu_123
@Sksahu_123 2 года назад
how to get changes in sheet dynamically to json
@shashankkhanduri7
@shashankkhanduri7 4 года назад
Hi.. i am getting the below error : Error log: Error: invalid_grant: Invalid JWT: Token must be a short-lived token (60 minutes) and in a reasonable timeframe. Check your iat and exp values and use a clock with skew to account for clock differences between systems.
@TriviaMania_
@TriviaMania_ 4 года назад
My code keeps saying "No key or keyFile set", which indicates invalid key according to google. I did download a service account Json(and not client ID); I also deleted then recreated my service account again but still no luck :(.
@kehan6252
@kehan6252 Год назад
Does anyone know how to access another person's spreadsheet? My coworker has the authority for the company's spreadsheet but I can't access with Node.js since it is restricted only to the employees. Does anyone know how to bypass that? Like if I can sign in my work account and then use that to access the spreadsheet?
@antheasago6428
@antheasago6428 5 лет назад
Thanks for this video! Much appreciated. I do have a question, do you perhaps know why after I run a command, all that is returned is "Connected!' and nothing else?
@ExcelGoogleSheets
@ExcelGoogleSheets 5 лет назад
it looks like you forgot to call the function after console.log("connected");
@Mariusz.opalka
@Mariusz.opalka 3 года назад
@@ExcelGoogleSheets I have the same problem. It doesnt work for me. Here is the code: const {google} = require('googleapis'); const keys = require('./keys.json'); // nodejs.org/ // code.visualstudio.com // developers.google.com/sheets/api/quickstart/nodejs // console.developers.google.com // developers.google.com/identity/protocols/oauth2/scopes const client = new google.auth.JWT( keys.client_email, null, keys.private_key, ['www.googleapis.com/auth/spreadsheets'] ); client.authorize(function(err,tokens) { if(err) { console.log(err); return; } else { console.log('Connected!'); gsrun(client); } }); async function gsrun(cl) { const gsapi = google.sheets({version:'v4', auth: cl}); const opt = { spreadsheetId: 'XXXXXXXXXXXXX', range: 'Data!A1:B5' }; let data = await gsapi.spreadsheets.values.get(opt); console.log(data); }
@Mariusz.opalka
@Mariusz.opalka 3 года назад
it works now. code was ok. i dont know why it havent worked. I received this message error before: "Your message wasn't delivered to serviceman11@node-js-gs-api-test-XXXXX.iam.gserviceaccount.com because the domain node-js-gs-api-test-XXXXX.iam.gserviceaccount.com couldn't be found. Check for typos or unnecessary spaces and try again. " it works now. havent got any error msg.
@juancruzmoras4730
@juancruzmoras4730 4 года назад
Great tutorial congratulations! I'm having problems with the data.data.values , because I'm trying to store that value to a variable that use later in my code, but I think that the async function is running later than the rest of the code.... so I get and empy value of my variable
@ExcelGoogleSheets
@ExcelGoogleSheets 4 года назад
You won't be able to access it outside of that function. Elsewhere you can pass it as an argument to a different function.
@jurekskowron8192
@jurekskowron8192 4 года назад
I tried to to this. Maybe it will be helpful to do like this: (In main async IIFE you get receivedData from spreadsheet and then, still in this IIFE you can do different things with the data) const { google } = require("googleapis"); const keys = require("./keys.json"); const client = new google.auth.JWT(keys.client_email, null, keys.private_key, [ "www.googleapis.com/auth/spreadsheets" ]); const gsrun = async cl => { const gsapi = google.sheets({ version: "v4", auth: cl }); const opt = { spreadsheetId: "1NabcyX9jnAGQCZjnylhKSc8T30SeoeDS5CUudQoqZvI", range: "Arkusz1!A2:B5" }; const data = await gsapi.spreadsheets.values.get(opt); const dataArray = data.data.values; return dataArray; }; // main async IIFE (async () => { client.authorize(function(err, tokens) { if (err) { console.log(err); return; } console.log("Connected"); }); const receivedData = await gsrun(client); // you can use receivedData here later: console.log("later", receivedData); })();
@juancruzmoras4730
@juancruzmoras4730 4 года назад
@@jurekskowron8192 thanks a lot!!!
@jurekskowron8192
@jurekskowron8192 4 года назад
@@juancruzmoras4730 De nada
@nabilmediouni5069
@nabilmediouni5069 4 года назад
hello, thanks for the video it was really helpful. Please I want to get the data as objects not arrays of each row. for example: {"id": "1212","name": "Nabil"..}. In your example, each row is in an array. Is there a way to change the response to get data as I want?
@ExcelGoogleSheets
@ExcelGoogleSheets 4 года назад
You can convert yo array of objects yourself. There is an example how to do it both ways in this video ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-0KuSD5PGQF8.html
@vashivanreyramos5458
@vashivanreyramos5458 Год назад
I have this that said gaxios login required how do i fix that ?
@iambhuvnesh
@iambhuvnesh 4 года назад
UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:14728) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. this error appears at this point ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-MiPpQzW_ya0.html It seems to be related to NodeJS. What to do ?
@ExcelGoogleSheets
@ExcelGoogleSheets 4 года назад
The API call failed. Could be millions of reasons. Did you test the connection to make sure it works before calling the API?
@carlsommer2638
@carlsommer2638 4 года назад
@@ExcelGoogleSheets I'm not the original poster here, but had the same issue. What specifically do you mean by "test the connect"? I was able to get the console log "Connect" message fine before the gsrun function.
@rogue1183
@rogue1183 3 года назад
Hey, how can I make borders for cells with this?
@allan4317
@allan4317 2 года назад
Google API no longer automatically downloads Json file. So I'm lost after that.
@subhamchoudhary9123
@subhamchoudhary9123 3 года назад
not able to access spreadsheet... after successfully creating it by APi.. it says access denied.. Any Fix?
@joshmadrid5253
@joshmadrid5253 3 года назад
is it posible to get the headers like ID and Name as keys in the array like [id: "1", name: "anna"] and so on?
@ExcelGoogleSheets
@ExcelGoogleSheets 3 года назад
Not directly from API. You'll need to write the JavaScript to convert the data. You can see an example of that if you watch my SUPERSQL function videos.
@joshmadrid5253
@joshmadrid5253 3 года назад
​@@ExcelGoogleSheets I was able to get some help from a friend this worked for me function fixArr(apiRes) { const keyValue = apiRes.shift() const persons = []; let result = {} for (let i = 0; i < apiRes.length; i++) { for (let j = 0; j < keyValue.length; j++) { result = {...result, [keyValue[j]]: apiRes[i][j]}; if (j === keyValue.length - 1) { persons.push(result); } } } return persons } var googleData = fixArr(parent.data.values); console.log(googleData)
@joshmadrid5253
@joshmadrid5253 3 года назад
Any ideas why it is not reading my keys file ./keys.json and then unable to find the email or the keys
@joshmadrid5253
@joshmadrid5253 3 года назад
{keys} it needs to be just keys missed that typing too fast
@abdelmounsifsafir6024
@abdelmounsifsafir6024 3 года назад
Hi thank your video i have mistack when i do node main.js, "(node:7156) UnhandledPromiseRejectionWarning: Error: Unable to parse range: Data!C23:C27"b - thanks your help
@ExcelGoogleSheets
@ExcelGoogleSheets 3 года назад
Do you have a worksheet in your spreadsheet called "Data"?
@joseismaelcastroruiz6073
@joseismaelcastroruiz6073 5 лет назад
como le para agregar únicamente la concatenación? Gracias de antemano y saludos cordiales.
@tsar6652
@tsar6652 4 года назад
Can this be run automatically when the Excel sheet gets updated?
@ExcelGoogleSheets
@ExcelGoogleSheets 4 года назад
You can add a macro in your excel file to run a shell command on change or probably better on save and execute the node command.
@cristianovagnoni7556
@cristianovagnoni7556 5 лет назад
20.45m... i have write "node main.js" on the terminal, but do not function...what should be the problem?
@Victor-cn1ku
@Victor-cn1ku 5 лет назад
Be sure that you type "node main.js" on the same directory that you create the "main.js" file, otherwise it will not work ;)
@keithhill3034
@keithhill3034 Год назад
links on the screen but missing from the description: - nodejs.org/ - code.visualstudio.com/ - developers.google.com/sheets/api/quickstart/nodejs - console.developers.google.com
@ExcelGoogleSheets
@ExcelGoogleSheets Год назад
Thank You!
@yad9701
@yad9701 3 года назад
I was getting an error "unable to parse range". Changing the range value from 'Data!A1:B5' to just 'A1:B5' fixed it.
@ExcelGoogleSheets
@ExcelGoogleSheets 3 года назад
Data refers to the name of the worksheet. So you should change it to your worksheet name.
@soumyajitdatta9203
@soumyajitdatta9203 3 года назад
Hi... I am getting a 400 error code saying bad request
@salmansaysit
@salmansaysit 4 года назад
UnhandledPromiseRejectionWarning: TypeError: gsapi.spreadsheets.values is not a function
@vishusharma7007
@vishusharma7007 3 года назад
UnhandledPromiseRejectionWarning: Error: Invalid Credentials
@luisforni86
@luisforni86 2 года назад
Hello, very good video! How can it be done with a synchronous function?
@ExcelGoogleSheets
@ExcelGoogleSheets 2 года назад
Not by default. There might be some library in Node that helps make asynchronous functions synchronous but it kinda defeats the whole purpose of using Node. I would say if you want to use synchronous code use Python instead.
@luisforni86
@luisforni86 2 года назад
​@@ExcelGoogleSheets I want it to be synchronous to make a loop that prints data from the cell in ascending order every 10 seconds. EXAMPLE: A1, wait 10 seconds; A2, wait 10 seconds; A3, wait 10 seconds ... I couldn't make it synchronous, it prints the cells out of order
@ExcelGoogleSheets
@ExcelGoogleSheets 2 года назад
Try this www.npmjs.com/package/deasync
@andreagongora1955
@andreagongora1955 2 года назад
It still works for me, except that I delete !Data in range, like this: range: 'A2:B5'
@ExcelGoogleSheets
@ExcelGoogleSheets 2 года назад
Classic comment from people who don't regularly use spreadsheets :) "Data" is the worksheet name. If your worksheet is called Sheet1 then it should be Sheet1!A2:B5, if it's called Amazing Code then it would be 'Amazing Code'!A2:B5 Otherwise by changing to A2:B5 it will grab it from the first worksheet, which in the future may end up being not the first one and your code will fail.
@happyoe398
@happyoe398 4 года назад
great one thanks. can you share some the code source ?
@nicksonbonke2608
@nicksonbonke2608 4 года назад
Hi Nice video can we be able to update values using this app?
@ExcelGoogleSheets
@ExcelGoogleSheets 4 года назад
Sure.
@nickkalfas3271
@nickkalfas3271 3 года назад
I get a "google.sheets is not a function" error. Has anything changed on this since the release of this tutorial?
@ExcelGoogleSheets
@ExcelGoogleSheets 3 года назад
It should be the same.
@nickkalfas3271
@nickkalfas3271 3 года назад
@@ExcelGoogleSheets oh god...off to find that missing comma then...Thanks!
@saadaor
@saadaor 3 года назад
why am i get this error: TypeError: Class constructor JWT cannot be invoked without 'new' on: const client = google.auth.JWT(keys.client_email, null, keys.private_key, [ "www.googleapis.com/auth/spreadsheets"]);
@ExcelGoogleSheets
@ExcelGoogleSheets 3 года назад
try const client = new google.auth.JWT(keys.client_email, null, keys.private_key, [ "www.googleapis.com/auth/spreadsheets"]);
Далее
Modus males sekolah
00:14
Просмотров 12 млн
Web App w/ Google Charts, Google Sheets & Apps Script
33:25
Google Sheets - Python API, Read & Write Data
28:01
Просмотров 189 тыс.
Google Apps Script Tutorial for Beginners
23:54
Просмотров 376 тыс.
Use Excel VBA to Read API Data
20:48
Просмотров 136 тыс.
Pydantic Tutorial • Solving Python's Biggest Problem
11:07