https://github.com/calcuis/excel-pdf-convertor
https://github.com/calcuis/excel-pdf-convertor
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/calcuis/excel-pdf-convertor
- Owner: calcuis
- Created: 2024-08-01T05:58:35.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-08-01T06:04:40.000Z (10 months ago)
- Last Synced: 2025-01-21T13:11:36.690Z (5 months ago)
- Language: Python
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### convert excel to pdf
This script will:
- Read all `.xls` and `.xlsx` files in the current directory.
- Convert each Excel file to a PDF file with the same base name.
- Save the PDF files in the same directory.Explanation:
- `pandas` is used to read the Excel files.
- `reportlab` is used to create the PDF files.
- The `excel_to_pdf` function reads the Excel file and converts its content into a PDF table.
- The `convert_all_excels_to_pdfs` function iterates over all files in the specified directory, checks if they are Excel files, and converts them to PDFs.Test it by:
```
py convertor.py
```