recipe-backup-sheet-as-csv

Export Google Sheets spreadsheets as CSV files for local backup or processing.

Updated Nov 9, 2023
One-click install
npx skills add https://github.com/oresttokovenko/dot-files --skill recipe-backup-sheet-as-csv-oresttokovenko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: recipe-backup-sheet-as-csv
Source: https://github.com/oresttokovenko/dot-files/tree/main/chezmoi/dot_agents/skills/recipe-backup-sheet-as-csv
Command: npx skills add https://github.com/oresttokovenko/dot-files --skill recipe-backup-sheet-as-csv-oresttokovenko

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Google Sheets data lives in the cloud and is hard to archive or process locally. This Skill exports any spreadsheet as a CSV file so you can keep local backups or feed the data into other tools. ## Core Features & Use Cases - Spreadsheet Inspection: Retrieve spreadsheet metadata and details using the gws sheets API before exporting. - CSV Export: Export a full spreadsheet as a CSV file via the Google Drive files export endpoint. - Direct Range Reading: Read a specific sheet range directly in CSV format without a full export. - Use Case: You maintain a project tracker in Google Sheets and want a weekly local snapshot. Run this recipe to export the sheet as CSV and store it in your backup folder. ## Quick Start Export my Google Sheet with ID SHEET_ID to a CSV file for local backup.

Frequently Asked Questions about recipe-backup-sheet-as-csv

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I export a Google Sheet as CSV from the command line?

Use the gws drive files export command with the spreadsheet ID and mimeType set to text/csv. Alternatively, run gws sheets +read with the spreadsheet ID, sheet range, and csv format to read values directly.

How to back up Google Sheets data locally?

Export the spreadsheet as a CSV file using the Google Drive export endpoint and save the output to your local filesystem. This recipe automates that flow using the gws CLI with a single spreadsheet ID.

What tools are required to export Google Sheets via gws?

You need the gws CLI binary installed plus the gws-sheets and gws-drive skills loaded. These provide access to the Google Sheets and Drive APIs used for reading and exporting spreadsheet data.

Can I export only one sheet or range instead of the whole spreadsheet?

Yes, use gws sheets +read with the spreadsheet ID and a specific range such as Sheet1, with format set to csv. This reads only that range instead of exporting the entire file.

Why does CSV export only include one sheet from my spreadsheet?

The CSV format supports a single table, so the Drive export endpoint returns only one sheet's data. To capture multiple sheets, export each sheet range individually using the sheets read command.