Add a blank spreadsheet to a folder using the files.create method of the Drive API, specifying application/ as the mimeType.For more information on moving files, refer to Move files between folders. After the spreadsheet is created, move it to a specific folder using the files.update method of the Drive API.However, there are 2 alternatives to saving a file to a Drive folder: By default, the created spreadsheet is saved to the user’s root folder on Drive. ![]() There’s no option to create a spreadsheet directly within a specified Drive folder using the Sheets API. Public static String createSpreadsheet(String title) throws IOException " Work with Google Drive folders * IOException - if credentials file not found. * title - the name of the sheet to be created. ![]() * Class to demonstrate the use of Spreadsheet Create API */ Import .sheets.v4.model.SpreadsheetProperties
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |