Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ExcelExtractorJsonPDF-0.1.tar.gz (3.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page