https://github.com/zauberware/excel-worksheets-to-csv
Extract worksheets from an Excel file and saves them as separated CSV files.
https://github.com/zauberware/excel-worksheets-to-csv
csv csv-converter csv-export excel-converter excel-to-csv python python-script python2 python3 worksheet-to-csv xlsx-to-csv xlsx-workbook
Last synced: 3 months ago
JSON representation
Extract worksheets from an Excel file and saves them as separated CSV files.
- Host: GitHub
- URL: https://github.com/zauberware/excel-worksheets-to-csv
- Owner: zauberware
- License: mit
- Created: 2019-01-31T14:09:35.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-31T14:34:29.000Z (over 6 years ago)
- Last Synced: 2025-01-21T05:26:59.507Z (4 months ago)
- Topics: csv, csv-converter, csv-export, excel-converter, excel-to-csv, python, python-script, python2, python3, worksheet-to-csv, xlsx-to-csv, xlsx-workbook
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Export Worksheets from Excel to CSV
This script will help you to extract Worksheets from an Excel file. It already saved me days of my lifetime!
## Run the example
Clone this repository and try to run the example file. The file has 3 worksheets: `Worksheet 1`, `Another data set` and `Last`
1. `git clone [email protected]:zauberware/excel-worksheets-to-csv.git && cd excel-worksheets-to-csv`
2. `python worksheet_to_csv.py example.xlsx`Now you should see `Worksheet 1.csv`, `Another data set.csv` and `Last.csv` in the exports folder.
## Export all Worksheets
To export all worksheets to CSV run `python worksheet_to_csv.py example.xlsx` like in the example.
## Export specific Worksheets
To export only specific worksheets you can specify them comma seperated as the second argument of the script.
**Example: Export only `Worksheet 1` and `Last`:**
`python worksheet_to_csv.py example.xlsx "Worksheet 1,Last"`
## Prerequisites
* Be sure `openpyxl` and `imp` is installed.
* Convert your file into XLSX format if needed. It not works with other excel formats.