Python package for converting data from Excel to JSON and PDF
Project description
ExcelExtractorJsonPDF
ExcelExtractorJsonPDF is a Python package designed to simplify the process of converting data from Excel files to JSON and PDF formats. It provides easy-to-use functions that can adapt to any type of Excel file, allowing users to customize column headers and attributes dynamically.
Features
- Convert Excel files to JSON format.
- Generate PDF reports from JSON data.
- Customize column headers and attributes for flexible data processing.
Installation
You can install ExcelExtractorJsonPDF via pip:
pip install ExcelExtractorJsonPDF
Usage
from ExcelExtractorJsonPDF.converter import excel_to_json, json_to_pdf
# Example usage:
excel_file_path = 'path/to/your/excel/file.xlsx'
table_header = ["Recruiters", "Cabinets", "LinkedIn", "Mail"]
attrs = ["Recruteurs", "Cabinets", "LinkedIn", "Mail Pylote"]
json_data = excel_to_json(excel_file_path, attrs)
pdf_output_path = 'output.pdf'
result = json_to_pdf(json_data, pdf_output_path, table_header, attrs)
if 'error' in result:
print(f'Error: {result["error"]}')
else:
print(f'Success! PDF report generated at {pdf_output_path}')
Replace 'path/to/your/excel/file.xlsx' with the path to your Excel file. Customize table_header and attrs according to your Excel file's column headers and attributes.
Requirements
- pandas
- reportlab
License
This project is licensed under the MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for ExcelExtractorJsonPDF-0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96c52bed5596312bdae08b015616de3611f2a9741c35003eb6b9fab72fc8e09d |
|
MD5 | 08d021724ebe45b32732bd18dbbd0ab3 |
|
BLAKE2b-256 | fac28d2dcd9ee3650cfd1994b30095654906b9198ac3a072efb4d09b4f06c080 |