Total Pageviews

2020/09/08

[Google Sheet] How to download Google Sheet via command line as Excel file?

Requirement
How to download Google Sheet via command line as Excel file into specific directory?


How-To
In Windows:
powershell -command "& { (New-Object Net.WebClient).DownloadFile('https://docs.google.com/spreadsheets/d/xxxxx/export?format=xlsx', 'src/main/resources/source/batchConfigFile.xlsx') }"

In Mac OS:
curl -L "https://docs.google.com/spreadsheets/d/xxxxx/export?format=xlsx" > src/main/resources/source/batchConfigFile.xlsx


No comments: