Work with Google Sheets from Java

Add new sheet


final String spreadsheetId = "my spreadsheetId";

List<Request> requests = new ArrayList<>();
SheetProperties sheetProperties = new SheetProperties().setTitle("New Sheet");
requests.add(new Request().setAddSheet(new AddSheetRequest().setProperties(sheetProperties)));

BatchUpdateSpreadsheetRequest requestBody = new BatchUpdateSpreadsheetRequest();
requestBody.setRequests(requests);

Sheets.Spreadsheets.BatchUpdate request = service.spreadsheets().batchUpdate(spreadsheetId, requestBody);

BatchUpdateSpreadsheetResponse response = request.execute();

Recommended Posts

Work with Google Sheets from Java
Code Java from Emacs with Eclim
Use Java 11 with Google Cloud Functions
What I learned from doing Java work with Visual Studio Code
Call Java library from C with JNI
API integration from Java with Jersey Client
Getting Started with Java Starting from 0 Part 1
Execute Java code from cpp with cocos2dx
google java format
Run Rust from Java with JNA (Java Native Access)
[Java] Set the time from the browser with jsoup
Text extraction in Java from PDF with pdfbox-2.0.8
[Java] Get images with Google Custom Search API
Install java with Homebrew
Call Java from JRuby
Changes from Java 8 to Java 11
Sum from Java_1 to 100
Change seats with java
Install Java with Ansible
Eval Java source from Java
Call a method with a Kotlin callback block from Java
Comfortable download with JAVA
Access API.AI from Java
Switch java with direnv
From Java to Ruby !!
[Note] Create a java environment from scratch with docker
Download Java with Ansible
Let's scrape with Java! !!
Read temperature / humidity with Java from Raspberry Pi 3 & DHT11
Build Java with Wercker
Endian conversion with JAVA
Find the address class and address type from the IP address with Java
parquet-tools gives java.lang.ExceptionInInitializerError, so I made it work with java8
[Java] Get Charset with Apathce Tika / Initialize String from Charset [Kotlin]
Run analysis with OpenJDK11 Java Flight Recorder + Google Kubernetes Engine
Easy BDD with (Java) Spectrum?
Use Lambda Layers with Java
Java multi-project creation with Gradle
Getting Started with Java Collection
Java Config with Spring MVC
Migration from Cobol to JAVA
Basic Authentication with Java 11 HttpClient
Run batch with docker-compose with Java batch
[Template] MySQL connection with Java
Install Java 7 with Homebrew (cask)
[Java] JSON communication with jackson
Solve Google problems with Ruby
Try DB connection with Java
Java starting from beginner, override
Creating ElasticSearch index from Java
Enable Java EE with NetBeans 9
New features from Java7 to Java8
[Java] JavaConfig with Static InnerClass
Try gRPC with Java, Maven
@ClassRules doesn't work with PowerMockRunner
Let's operate Excel with Java! !!
Version control Java with SDKMAN
Automate your work with Rake
Paging PDF with Java + PDFBox.jar
Sort strings functionally with java
Object-oriented (java) with Strike Gundam