---
id: ssh2-recipe-backup-sheet-as-csv
name: "recipe-backup-sheet-as-csv"
url: https://skills.yangsir.net/skill/ssh2-recipe-backup-sheet-as-csv
author: googleworkspace
domain: data-analysis
tags: ["google-sheets", "csv-export", "data-backup", "google-drive-automation", "data-management"]
install_count: 15200
rating: 4.50 (152 reviews)
github: https://github.com/googleworkspace/cli
---

# recipe-backup-sheet-as-csv

> 能够将Google表格导出为CSV文件，用于本地备份或离线使用，确保数据安全和便捷访问。

**Stats**: 15,200 installs · 4.5/5 (152 reviews)

## Before / After 对比

### 轻松备份Google表格数据，确保信息安全。

## Readme

# Export a Google Sheet as CSV

> **PREREQUISITE:** Load the following skills to execute this recipe: `gws-sheets`, `gws-drive`

Export a Google Sheets spreadsheet as a CSV file for local backup or processing.

## Steps

1. Get spreadsheet details: `gws sheets spreadsheets get --params '{"spreadsheetId": "SHEET_ID"}'`
2. Export as CSV: `gws drive files export --params '{"fileId": "SHEET_ID", "mimeType": "text/csv"}'`
3. Or read values directly: `gws sheets +read --spreadsheet SHEET_ID --range 'Sheet1' --format csv`



---
*Source: https://skills.yangsir.net/skill/ssh2-recipe-backup-sheet-as-csv*
*Markdown mirror: https://skills.yangsir.net/api/skill/ssh2-recipe-backup-sheet-as-csv/markdown*