Skip to content

lancechentw/xls2csv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

xls2csv - Convert all work sheets in an Excel file to CSV files.

Installation

pip install xlrd

Usage

python xls2csv.py <input.xls> [output_dir]

Examples

Convert a single XLS file (CSV files will be created in the same directory):

python xls2csv.py data.xls

Convert to a specific output directory:

python xls2csv.py data.xls ./output

Output

Each worksheet in the XLS file is converted to a separate CSV file:

  • <input_file>_<worksheet_name>.csv

For example, data.xls with sheets "Sales" and "Inventory" produces:

  • data_Sales.csv
  • data_Inventory.csv

Features

  • Converts all worksheets to individual CSV files
  • Handles Excel dates (converts to ISO format: YYYY-MM-DD)
  • Creates safe filenames (special characters replaced with underscores)
  • UTF-8 encoding for international characters

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages