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")
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.0.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.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: exceljsontoolkit-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 fdecfba860965c984ec69ff341dd4778e42675cb0770e6a98d82fa5acbc1b147
MD5 aae65f49712c7dad43f4d5cd4dc41686
BLAKE2b-256 cc77353199e0e95a34c0138e6e6509f66906b01cc6b93baaa139ea90f4b8ee20

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for exceljsontoolkit-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bcb84138465ad4bc5a2b1acce238df94497b3c1c423245f80148a20d78b1a5e5
MD5 03cdc6f901faf3110b4afcde65a651c1
BLAKE2b-256 6d6d987663f864c9f08fc54d0b625bd84517216210cde06840dcda984d20b60a

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