Google Sheets and Java

Поделиться
HTML-код
  • Опубликовано: 1 янв 2025

Комментарии • 94

  • @TheFuzzyketchupTuts
    @TheFuzzyketchupTuts 5 лет назад +14

    Can you post a pastebin with the code?

  • @andreykozinov2484
    @andreykozinov2484 5 лет назад +11

    Will it be a big difference if I want to do an android app and read/write data from google sheet? Is it possible to make a video for that case?

  • @charlie-cb4gt
    @charlie-cb4gt 3 года назад +2

    the quickstart for java site doesn't seem to work the same way anymore so i've been on the first minute of this video for 2 hours, my head hurts, i'm tired, i don't understand any of it, i wanna cry

  • @colbypeterson2316
    @colbypeterson2316 Год назад +1

    Very nice guide - was looking to use google sheets for a java application and just could not understand how to get it to work before this video. I did get some errors with the Jackson json reader in this modern day and age 4 years later, but that was nothing finding Gson couldn;t solve. Thanks for this!

  • @joaofolgado3316
    @joaofolgado3316 4 года назад +3

    the console give me this error "because you are running on a non-POSIX file system" what can i do? thanks

    • @СашаСачук-л1ч
      @СашаСачук-л1ч 4 года назад

      hey, i have the same error. Have you fixed it?

    • @joaofolgado3316
      @joaofolgado3316 4 года назад

      @@СашаСачук-л1ч hey, that error is not a problem. My program works very Nice with that error. But if you want to know about posix file sYSTEMS Google it, there are much information about that.

    • @OwnedTime
      @OwnedTime 3 года назад

      its not error. This is WARNING!

    • @joaofolgado3316
      @joaofolgado3316 3 года назад

      @@OwnedTime “but if you want to know about posix file systems google it” i said. For me still working just fine.

  • @imanotjr1368
    @imanotjr1368 Год назад

    Amazing video, I couldn't find any simple to follow guide/documentation since the Google API's are so complex. Very good job sir.

  • @sirajmunir770
    @sirajmunir770 4 года назад +2

    Getting this exception. I have also tried deleting and re-generating the credentials.json file.
    Exception in thread "main" com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden {
    "code" : 403,
    "errors" : [ {
    "domain" : "global",
    "message" : "Insufficient Permission",
    "reason" : "insufficientPermissions"
    } ],
    "message" : "Request had insufficient authentication scopes.",
    "status" : "PERMISSION_DENIED"
    }

    • @vietcharly
      @vietcharly 4 года назад

      Were you able to resolve this?

    • @vietcharly
      @vietcharly 4 года назад +2

      I was able to resolve it, I changed the sheets status from 'anyone with link can read' to 'write'. Then I went in and changed this line .setDataStoreFactory(new FileDataStoreFactory(new java.io.File("tokens"))) from tokens to 'token' to generate a new token

    • @sirajmunir770
      @sirajmunir770 4 года назад

      Okay, I will try this one.

  • @joaquin70107
    @joaquin70107 5 лет назад +1

    I used the Google example and no problem but when i try to use my GoogleSheets doesnt work, i changed de String range and the SpreadSheets ID. Whats wrong?? any quick help would be awesome

  • @スリーレクシュフミ
    @スリーレクシュフミ 2 года назад

    0:41 you did not explain what is this. I don't understand what is Java quick start .

  • @Ntrinzc
    @Ntrinzc 5 лет назад +1

    the code name at 2:48, pathname at 3:43 and set access type at 3:47 throws an error saying it can't be resolved, anyone know how to fix this / let me know what I did wrong?

  • @raylaphuc579
    @raylaphuc579 5 лет назад +1

    What is the test folder for?

  • @wolontong
    @wolontong 2 года назад

    is there a way to read google sheet like how you read sql and show the data as table in java?

  • @dongphuongtran
    @dongphuongtran 4 года назад +2

    If I want to get values, I have to have "range".
    So how to get all rows when I don't knows number of rows or range?
    Thanks.

    • @tobias95900
      @tobias95900 3 года назад

      If you know count of columns, just set range ="A:columns count"
      For example range = "A:K"

  • @AnonimosExeretis
    @AnonimosExeretis Год назад

    Finaly Gradle capable RUclips tutorial. Cheers!

  • @VivekSingh-ee7ww
    @VivekSingh-ee7ww 2 года назад

    Do we need any subscription to access Google sheets API ?

  • @smhmyhead9184
    @smhmyhead9184 Год назад

    what if I don't want anyone with the link to edit my sheet&

  • @kyrylochornobryvets3385
    @kyrylochornobryvets3385 Год назад

    For a long time I can not find a way to write data without duplicates. At the same time, I want to compare duplicates not by all columns, but by certain ones (for example, to compare only by one column). How can I do that? Perhaps you already have such a video or a link to a site with an explanation. Thank you.

  • @IronMan-yb7ps
    @IronMan-yb7ps 3 года назад

    Exception in thread "main" java.lang.NoSuchMethodError: 'java.lang.Object com.google.api.client.json.JsonFactory.fromReader(java.io.Reader, java.lang.Class)'
    Why this error

  • @shajeelafzal
    @shajeelafzal 5 лет назад +5

    Please make one for Google Sheets and JavaScript.

    • @twilio
      @twilio  5 лет назад +2

      We made one already :) ruclips.net/video/UGN6EUi4Yio/видео.html

    • @shajeelafzal
      @shajeelafzal 5 лет назад +2

      @@twilio Thank you so much. Loved it.

    • @twilio
      @twilio  5 лет назад +1

      Awesome! Let us know if there’s anything else you’d like to see.

    • @naveentiwari4763
      @naveentiwari4763 4 года назад

      @@twilio Please make one for Google Sheets and Apex Salesforce

  • @d_a_r_ii
    @d_a_r_ii 2 года назад

    Hello, I have got a problem. Now google offers another way of getting credentials.json. On that webpage I don't see this stuff which you got. Can you please tell me where should I install credentials.json?

  • @yasseralbrikeet2292
    @yasseralbrikeet2292 4 года назад

    Is there a way to make user choose his own spreadsheet. Fo example if you make the application available in playstor of android , everyone download the application will use same spreadsheet?!

  • @ryangauthier3957
    @ryangauthier3957 4 года назад +1

    Doesn't seem like a true CRUD since you manually created the google sheet to read, update, and delete. Is it possible to programatically create a Google Sheet? I have been looking all over and in the Google Dev documentation would appreciate any help.

    • @twilio
      @twilio  4 года назад

      I believe you could create the sheet using the Google Drive API.

  • @VivekSingh-ee7ww
    @VivekSingh-ee7ww 2 года назад

    Can it be done using maven ?

  • @olegchorpita5681
    @olegchorpita5681 4 года назад +1

    can you please provide more info about how you can get credentials and what exactly was specified at console developer?

  • @danielolili
    @danielolili 5 лет назад +1

    How do I go about updating a row`s data based on an ID i placed in one of the row`s cells?

    • @twilio
      @twilio  5 лет назад +1

      The easiest way is probably to use batchGetByDataFilter and then do an update on the resulting row: developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/batchGetByDataFilter

  • @rajatgupta7994
    @rajatgupta7994 4 года назад

    If we are using java for google sheets that 6 minutes job time out still.implies?

  • @sarahamlili5227
    @sarahamlili5227 2 года назад

    What changes should be made If I'm using it for an Android app java?

  • @FeruuPL
    @FeruuPL 5 лет назад +1

    Hi, I'm getting GoogleJsonResponseException: 403 Forbidden error while writing values into cells with message: "Request had insufficient authentication scopes." and status: "PERMISSION_DENIED". Do you have any idea what causes this error?

    • @FieryMelon300
      @FieryMelon300 5 лет назад +1

      try deleting the token you generated if you ran it originally as SPREADSHEET_READONLY and rerunning the code

  • @Morbid-mma
    @Morbid-mma 2 года назад

    how to i refresh credentials

  • @imacoolguyful
    @imacoolguyful 3 года назад

    How can I authenticate like you did at 6:28 from within a docker container, im very curious

    • @twilio
      @twilio  3 года назад

      I think you should be able to. The example we’re showing shows how to do this with a document but you can also pass the values in directly.

    • @imacoolguyful
      @imacoolguyful 3 года назад

      @@twilio do you have any recommendations on what I should Google for, I couldnt find anything in Google sheets docs

  • @Artegentx
    @Artegentx 4 года назад

    By any change, is there a way to avoid the consent request?

  • @DhimanDa
    @DhimanDa 2 года назад +1

    can you please share the code please?

  • @maheshreddy1612
    @maheshreddy1612 4 года назад

    If i run this code at server side, how can i give the permission to sheet at first time.

  • @PianoSurRia
    @PianoSurRia 3 года назад

    When creating input stream for CREDENTIALS_FILE_PATH better to use try with resources

  • @neilabad9753
    @neilabad9753 3 года назад

    Can you please teach me how to get data on a specific column only?

  • @fatihaknbayraktar8735
    @fatihaknbayraktar8735 4 года назад

    It is OK. But you copy google oauth link from console. I want to use with spring boot rest web service. How can I do without an extra login page? Is it possible?

  • @kunalsalunkhe8411
    @kunalsalunkhe8411 2 года назад

    I am unable to load creadentials.json in resources

  • @donvj007
    @donvj007 5 лет назад +1

    How can I get this code?🙄

  • @MaximaToluene
    @MaximaToluene 4 года назад

    Will this work as a springboot web app?

  • @macare-engineering8379
    @macare-engineering8379 4 года назад +1

    Thanks...please make a video on how to get value with query in google sheets using java.

  • @sjljc2019
    @sjljc2019 5 лет назад

    Can we do it without making the project a gradle project?? I am getting error "java.lang.ClassNotFoundException: org.mortbay.component.LifeCycle"

    • @sjljc2019
      @sjljc2019 5 лет назад

      @@twilio I asked it regarding the code that is explained in the video. I think I have been provided with a wrong link.

    • @twilio
      @twilio  5 лет назад

      @@sjljc2019 Oh yes sorry you are correct. I thought you were missing the Twilio library but we don't use that in this video :) The full installation instructions (including the zip files for Google's Java SDK) are here: developers.google.com/api-client-library/java/google-api-java-client/setup

  • @OMGerCodeHub
    @OMGerCodeHub 2 года назад

    After breaking my head for 20minutes why the hell can't I run the read on my own file, I figured it out,
    When you do the read (not sure when they changed it) you don't need the file name when you specify a range.

  • @cring334
    @cring334 5 лет назад +3

    got error
    Execution failed for task ':SheetsAndJava.main()'.
    > Process 'command '/Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
    can someone help? Im good at painting, not coding

    • @valizeth4073
      @valizeth4073 4 года назад

      It basically means that it failed, literally. You need to use the stack trace to get the actual errors, cause from that 1 message alone, it can be literally anything.

  • @hitechnic5246
    @hitechnic5246 Год назад

    This was really helpful, thanks)

  • @yaprakdepoterminal2434
    @yaprakdepoterminal2434 3 года назад

    everything's great except Dark theme, can't see nothing

  • @cring334
    @cring334 5 лет назад +2

    I got the error "Execution failed for task ':SheetsAndJava.main()'.
    > Process 'command '/Library/Java/JavaVirtualMachines/jdk-12.0.2.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1"
    can someone help?

    • @junkhoo9444
      @junkhoo9444 5 лет назад

      You need to find the error code to get a hint on what caused the execution to fail. For example if the error code is 400, then it means the server (google) cant understand your request (for the sheet) that you sent, a common mistake is your range value (in this case "congress!A2:F10"), there might be a typo. If its not then you will have to debug and look for your error

  • @eranmeir90
    @eranmeir90 5 лет назад +3

    This is great, thank you

  • @MartenLuisTraifalgar
    @MartenLuisTraifalgar 11 месяцев назад

    as a beginner, I still didn't get it :(

  • @highperformer_euw
    @highperformer_euw 5 лет назад +1

    Is there a way to do the same in Maven?

    • @bobfish4404
      @bobfish4404 4 года назад +1

      Yes very similar just import com.google.api.client as groupid and google-api-client as artifact id and same for the rest of the imports in your pom

  • @sixro
    @sixro 2 года назад

    WARNING: the authentication part in this video is obsolete

  • @PianoSurRia
    @PianoSurRia 3 года назад

    Comparing to Apache POI the google sheet API looks really ugly

  • @starlaboratory_ua
    @starlaboratory_ua 5 лет назад +3

    Thank you so much sir!!!!!!!!!!!!!

    • @twilio
      @twilio  5 лет назад +2

      You’re welcome!

  • @kamisamahisoka2633
    @kamisamahisoka2633 3 года назад

    Thank you! It helps alot.

  • @Mr.rawJat
    @Mr.rawJat 2 года назад

    please give me git repo

  • @dinislam3286
    @dinislam3286 5 лет назад +1

    We want to more videos about api service

  • @MckyMus-lo7ox
    @MckyMus-lo7ox 3 года назад

    Bro.... U a fucking g lad. i love you

  • @alexshepel5599
    @alexshepel5599 4 года назад

    nice

  • @addubgib
    @addubgib 5 лет назад +1

  • @senya1696
    @senya1696 Год назад

    for me InputStream in = SheetsAndJava.class.getResourceAsStream("path/to/file");
    didn't work for some reason I got null pointer exception all the time.
    I used FileInputStream in = new FileInputStream("path/to/file"); instead, now everything works fine