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 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
File details
Details for the file ExcelExtractorJsonPDF-0.2.tar.gz
.
File metadata
- Download URL: ExcelExtractorJsonPDF-0.2.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b71dfd40c13eb151bc014db63fbc90b01f10436c2e7ad435ca082dfbd8ef7304 |
|
MD5 | a7af3a4da879848844d9f7eb94797b40 |
|
BLAKE2b-256 | 1269ee0c6dd5a34e0b620726a0c222ac0a8178dbdaf65879df77fe22ff4fefc1 |