This is a boilerplate project that can be used to read and write from a Google Spreadsheet!
The foremost task, go to the following link and give it a read. https://developers.google.com/sheets/api/quickstart/java
- Make sure you complete Step 1.
- Download the
credentials.json
and keep it handy
git clone https://github.com/wizArD-1910/Connect-To-Google-Spread-Sheet-Using-Java.git
gradle build
- Copy
credentials.json
tosrc/main/resources
gradle run
- A browser window will open, accept and allow google for permissions after reading them
- Output should be displayed
- Go to
ReadFromSheet.java
- Change the spreadsheet id
- Go to
build.gradle
- Change
mainClassName = 'SheetsQuickstart'
tomainClassName = 'ReadFromSheet'
gradle run
- Go to
WriteToSheet.java
- Change the spreadsheet id
- Go to
build.gradle
- Change
mainClassName = 'SheetsQuickstart'
tomainClassName = 'WriteToSheet'
gradle run
After changing SCOPE or SpreadSheetId of your project, delete your tokens
folder and rerun the application
|-src
|-main
|-java
|-ReadFromSheet
|-SheetsQuickstart
|-WriteToSheet
|-resources
|-credential.json
|-build.gradle
|-settings.gradle
|-README.md
- The repository follows
Conventional Commits
andGitmoji
styling - The
.idea
folder contains files that will change project settings for better understanding of comments - For comments follow:
//TODO:
When you want users to complete some tasks//INFO:
Add external Information//Bug:
To suggests for bugs in code//URL:
For adding URLs