An intelligent Python application with a Graphical User Interface (GUI) to process and standardize unstructured text data generated by AI into a structured Excel format. This project was developed as a tool to streamline academic research by automating the process of data entry.
- GUI for Easy Use: A modern, user-friendly graphical interface built with PySide6 for intuitive data processing.
- Flexible Data Parsing: Reads data from a simple text file (
.txt
) with a user-defined delimiter (%
). - Intelligent Delimiter Handling:
- Maxsplit Logic: Processes rows with inconsistent column counts by intelligently placing all remaining content into the last column.
- User Control: Provides a checkbox to toggle this feature on or off.
- Duplicate Header Management: Automatically detects and skips repeated header rows in the data, preventing redundant entries.
- Error & Warning Reporting: Provides a comprehensive report of any issues (like missing files, inconsistent column counts, or extra delimiters) in a pop-up window after processing.
- Multilingual Interface: Supports multiple languages, including English, Persian, and others, through a simple dropdown menu.
- Excel Output: Converts the processed data into a clean, ready-to-use Excel file (
.xlsx
) using the pandas library.
Here is a screenshot of the graphical interface in action:
- Python 3.13.5: The core programming language for the project.
- PySide6: A professional, cross-platform framework for creating the GUI.
- pandas: An essential library for data manipulation and creating DataFrames.
- openpyxl: A library used by pandas to read and write Excel files (
.xlsx
). - os & sys: Standard Python modules for interacting with the operating system and file paths.
To run this project, you need to have Python installed. It is highly recommended to use a virtual environment.
-
Clone the repository: You can clone the repository using the following command:
git clone https://github.com/ahmadreza-hajtalebi/ai-text-to-excel-tool.git
Alternatively, you can download the project files directly from the repository's main page.
-
Install the required libraries: The project uses a
requirements.txt
file to list all dependencies. Install them with a single command:pip install -r requirements.txt
-
Prepare your input file:
- Create a text file (e.g.,
input_data.txt
) in thedata/
folder. - The first line must be the column headers, separated by a
%
delimiter. - Subsequent lines should contain your data, also separated by a
%
. - Example format:
Poem_Title%Verse_ID%Material_Mentioned%Material_Property The Raven%7%Oak%Durability%Toughness The Charge of the Light Brigade%22%Steel%__
- Create a text file (e.g.,
-
Get structured data from AI:
- To get data from an AI that is compatible with this script, use the prompt template provided in the
prompts/
folder. - The template helps you define the research subject, columns, and required output format.
- You can find the template file here: ai_prompt_template.txt
- To get data from an AI that is compatible with this script, use the prompt template provided in the
-
Run the GUI:
- Navigate to the
gui/
directory. - Execute the main application script:
python main_app.py
- Navigate to the
-
Process your data:
- Use the "Browse" buttons to select your input and output file paths.
- Enter the exact number of columns (e.g., 4).
- (Optional) Check the box to ignore extra delimiters.
- Click the "Process Data" button.
ai-text-to-excel-tool/
├── core/
│ └── data_processor.py # Core logic for data parsing and Excel output
├── gui/
│ ├── main_app.py # Main GUI application script
│ └── translations.py # Dictionary for multilingual support
├── data/
│ ├── input_data.txt # Example input file
│ └── e.g. example image.png # Screenshot of the GUI
├── prompts/ # Directory for AI prompt templates
│ └── ai_prompt_template.txt # Template for getting structured AI output
├── .gitignore
├── requirements.txt # Project dependencies
└── README.md # Project documentation
- Add supplementary tools for advanced Excel management (e.g., automatic column sizing, data sorting, and filtering).
- Add More Languages: Expand the translation dictionary to include more languages.
- Interactive Error Display: Display errors and warnings directly in a text widget on the GUI instead of a pop-up message box.
- Merge Existing Excel Data: Add an option to merge new data into an existing Excel file instead of creating a new one.
- Dark/Light Theme: Implement a dark mode or other visual themes.
Ahmadreza Haj Talebi - Aerospace Engineering student with a passion for programming and space.