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.

Author

Developed 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.1.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.1.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: exceljsontoolkit-0.1.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.1.1.tar.gz
Algorithm Hash digest
SHA256 bed287b62f6dcbbded373391bcb0b77c8c36bc93742d27e30c40e50cf3bf00a6
MD5 054dfe6e791f3fbe20e31d134379a2e5
BLAKE2b-256 e4f559202a9d9832fe43ac184db21e56de260cf52223a40f5a035be3de684d89

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for exceljsontoolkit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9c7955f97e87681846f0204cd64a99b6ca53cdf4c11946a3fa63ff888e983fff
MD5 3b5ef627a2208c2d0836ff8c78b060f1
BLAKE2b-256 bfe49289aa7b4e1109749aa3e95eb9ec90dd38cb37e7f40a3d6069df5678c1b2

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