███████╗██╗ ██╗ ██████╗███████╗██╗ ████████╗ ██████╗
██╔════╝╚██╗██╔╝██╔════╝██╔════╝██║ ╚══██╔══╝██╔═══██╗
█████╗ ╚███╔╝ ██║ █████╗ ██║ ██║ ██║ ██║
██╔══╝ ██╔██╗ ██║ ██╔══╝ ██║ ██║ ██║ ██║
███████╗██╔╝ ██╗╚██████╗███████╗███████╗ ██║ ╚██████╔╝
╚══════╝╚═╝ ╚═╝ ╚═════╝╚══════╝╚══════╝ ╚═╝ ╚═════╝
────────────────────────────────────────────────────────────
EXCEL → DOCX → CSV → PDF
Convert every sheet to separate files
Convert each sheet in an Excel file to separate DOCX, CSV, or PDF files. A Python CLI tool with no data loss, automatic cleanup, and full Unicode support.
# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# Install the project
pip install -e .Or run directly from project root (with .venv present):
./excelto report.xlsx -f docxexcelto report.xlsx -f docx # DOCX
excelto report.xlsx -f csv # CSV
excelto report.xlsx -f pdf # PDFCreates report_Sheet1.docx, report_Sheet2.csv, etc. for each sheet (format depends on -f).
excelto report.xlsx -f docx -o ./outputexcelto report.xlsx -f docx -s "Sheet1"Plain data export (no styling):
excelto report.xlsx -f csv
excelto report.xlsx -f csv -o ./output
excelto report.xlsx -f csv -d ";" # Semicolon delimiter (e.g. for Excel locales)Landscape mode, fit to page width. Sheet name (and title suffix) is added to every page by default:
excelto report.xlsx -f pdf
excelto report.xlsx -f pdf -o ./output
excelto report.xlsx -f pdf -m 0.3 # Tighter margins (inches)
excelto report.xlsx -f pdf -t "Report Date: January 2024" # Custom title suffix
excelto report.xlsx -f pdf --no-page-header # Omit sheet name from pagesPDF output is landscape with tables fit to page width. No data loss: long cell content is split into multiple rows automatically.
from excelto import ExcelConverter
with ExcelConverter("report.xlsx") as converter:
# DOCX
paths = converter.convert_all()
path = converter.convert_sheet("Sheet1")
# CSV
paths = converter.convert_all_to_csv()
path = converter.convert_sheet_to_csv("Sheet1")
# PDF
paths = converter.convert_all_to_pdf()
path = converter.convert_sheet_to_pdf("Sheet1", title_suffix="January 2024")
path = converter.convert_sheet_to_pdf("Sheet1", add_page_header=False) # No header on pages- Each sheet → separate DOCX file
- Table format preserved (Table Grid)
- First row styled as bold header
- Each sheet → separate CSV file
- Plain data only, no styling
- Configurable delimiter (comma, semicolon, etc.)
- UTF-8 encoding
- Each sheet → separate PDF file
- Landscape layout, tables fit to page width
- Sheet name + custom title on every page (optional,
--no-page-headerto disable) - No data loss: long cells split into multiple rows
- Unicode/Turkish character support
- Adjustable margins (
-m) - Font size scales down for wide tables
- Empty rows and columns removed automatically
- Empty or header-only sheets skipped
- Invalid filename characters sanitized
pip install -e ".[dev]"
pytest tests -vMIT License – see LICENSE for details.