Skip to main content

A toolkit to extract structured JSON from Excel, load it, and generate context maps.

Project description

Excel JSON Toolkit

Excel JSON Toolkit is a Python package that allows you to:

  • Extract structured JSON data from Excel files using OpenAI's LLMs.

  • Load JSON files into Python dictionaries.

  • Analyze and generate context maps describing the contents and dependencies of JSON files.

📦 Installation

pip install exceljsontoolkit

Note: Requires Python 3.7+

🔧 Requirements

  • pandas

  • openai

  • python-dotenv

These will be automatically installed with the package.

You also need to create a .env file with your OpenAI API key:

OPENAI_API_KEY=your_openai_key_here

🧠 Features

✅ Extract Structured JSON from Excel

Uses OpenAI's GPT model to clean, extract, and standardize tabular data from Excel sheets into well-structured JSON files.

from exceljsontoolkit import StructuredDataExtractor

extractor = StructuredDataExtractor(output_dir="output", model="gpt-4o-mini")
extractor.extract("your_excel_file.xlsx")

✅ Load JSON Files

Loads JSON files and returns them as a dictionary.

from exceljsontoolkit import LoadJsonFiles

loader = LoadJsonFiles()
data = loader.load_json_files("output/sheet1.json")

✅ Generate Context Map

Analyzes JSON structure and relationships between files.

from exceljsontoolkit import GenerateJsonContextMap

mapper = GenerateJsonContextMap()
context = mapper.generate_json_context_map(data)
print(context)

📁 Example Folder Structure

my_project/
├── your_excel_file.xlsx
├── output/
│   ├── Sheet1.json
├── .env

📃 License

This project is licensed under the MIT License.

Authors

Developed by Basil Yaqoob
Documented by Mahdi Jaffery

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

exceljsontoolkit-0.2.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

exceljsontoolkit-0.2.1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file exceljsontoolkit-0.2.1.tar.gz.

File metadata

  • Download URL: exceljsontoolkit-0.2.1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for exceljsontoolkit-0.2.1.tar.gz
Algorithm Hash digest
SHA256 7eb234e0972ff43ad9a0be0ed6d75a9c9ecc91b0364b18ac4a6c466f4ef92d7d
MD5 68b1e9cc855e8356eb755b08e66ab4ce
BLAKE2b-256 c18a53b7979c5d2d80c7b01c3e0be2f33359a449e5a9ef117ff0a72f0ad654bc

See more details on using hashes here.

File details

Details for the file exceljsontoolkit-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for exceljsontoolkit-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 036a2563d751dee20b6b685c7cb88a9cbb30213136bb2f2f287eb56831ecabd9
MD5 ff110f4845e3ea2dd5df0c543119cb83
BLAKE2b-256 20d6c819df96e683be74eff33579308708ef3fd819a7a0b2eaa738ffd95847d7

See more details on using hashes here.

Supported by

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