Skip to content

Latest commit

 

History

History
209 lines (157 loc) · 8.22 KB

File metadata and controls

209 lines (157 loc) · 8.22 KB

📊 Excel to Table Converter

Python PyQt6 OpenPyXL Platform

Excel to Table Converter is a powerful desktop application built with PyQt6 and Python that transforms Excel spreadsheets into beautifully formatted text tables — with drag & drop support, multi-sheet processing, ASCII art borders, and center-aligned content.

🎯 Perfect for: Developers, data analysts, documentation writers, students, and anyone who needs to display Excel data in plain text format.


📑 Table of Contents


🙌 Who is this for?

Category Description
👨‍💻 Developers Convert Excel data into readable text tables for logs, documentation, or CLI tools
📊 Data analysts Share spreadsheet data in plain text format via email or chat
📝 Documentation writers Embed Excel data into Markdown, README files, or text documents
🎓 Students & researchers Present tabular data in assignments and reports without screenshots
🖥️ System administrators Generate text-based reports from Excel export files

💡 Why use Excel to Table Converter?

Problem Solution
❌ Excel files can't be viewed in terminals or text editors ✅ Converts to plain text tables that work anywhere
❌ Screenshots of tables are not searchable ✅ Text tables are fully searchable and copyable
❌ Manual table formatting takes hours One click – automatic formatting with perfect alignment
❌ Multi-sheet Excel files are hard to share Each sheet becomes a separate .txt file
❌ Boring, ugly text output Beautiful ASCII art borders with professional styling

💡 Pro Tip: Use this tool to embed Excel data directly into your GitHub README files, documentation wikis, or log files!


✨ Features

Feature Description
🎯 Drag & Drop Simply drag your Excel file onto the app – no browsing needed
📑 Multi-Sheet Support Each sheet becomes a separate .txt file in the output folder
🎨 ASCII Art Borders Beautiful box-drawing characters for professional-looking tables
📐 Auto Alignment Content is automatically centered in each cell
📏 Smart Sizing Columns adjust to the longest word automatically
🖼️ Visual Feedback Icons and animations show the conversion status
💾 Desktop Default Automatically saves output to your Desktop
📂 One-Click Open Opens the output folder after successful conversion
🔤 UTF-8 Encoding Preserves all Unicode and special characters
🪟 Modern UI Clean, gradient-styled interface with rounded corners

📸 Screenshot

1 2 3 4 5 6 7

🚀 Getting Started

1️⃣ Clone the repository

git clone https://github.com/NullCoreX/Excel.git
cd Excel

2️⃣ Install dependencies

pip install PyQt6 openpyxl

3️⃣ Run the application

python Excel.py

🧩 How It Works

Step Action
1️⃣ Drag & Drop - Drag any .xlsx or .xls file onto the drop zone
2️⃣ Auto Detect - The app automatically detects the file and shows the Excel icon
3️⃣ Set Output - Choose or type your output directory (defaults to Desktop)
4️⃣ Click Convert - Press the big convert button
5️⃣ Get Tables - Each Excel sheet becomes a .txt file with beautiful ASCII tables
6️⃣ Auto Open - The output folder opens automatically when done

📁 Output Structure

After conversion, your output folder will look like this:

Desktop/
├── Sheet1.txt
├── Sheet2.txt
├── Sheet3.txt
└── ...

Example of Sheet1.txt:

┌──────────────┬─────────┬─────────────┐
│   Product    │  Price  │   Stock     │
├──────────────┼─────────┼─────────────┤
│   Laptop     │   $999  │     15      │
├──────────────┼─────────┼─────────────┤
│   Mouse      │   $25   │     150     │
├──────────────┼─────────┼─────────────┤
│  Keyboard    │   $75   │     45      │
└──────────────┴─────────┴─────────────┘

⚙️ Customization

You can easily modify the table style by editing the chars_1 list in Excel.py:

# Current style (professional)
chars_1 = ['├', '┤', '─', '┼', '└', '┘', '┌', '┐', '┬', '┴', '│']

# Alternative styles you can try:
# Simple style
simple_chars = ['+', '+', '-', '+', '+', '+', '+', '+', '+', '+', '|']

# Double-line style
double_chars = ['╞', '╡', '═', '╪', '╚', '╝', '╔', '╗', '╦', '╩', '║']

🐛 Troubleshooting

Issue Solution
Drag & drop not working Make sure you're dragging the file onto the dashed drop zone
File not loading Check that the file has .xlsx or .xls extension
Output folder not opening The folder path might not exist – check the output directory field
Empty tables Make sure your Excel sheet has data in the first row/column
Encoding issues The app uses UTF-8 – all characters are preserved

🔧 Development

Project Structure:

Excel.py
├── class Excel(QMainWindow)
│   ├── __init__()              # Initialize UI and connections
│   ├── set_icons_and_titles()  # Setup window icons and title
│   ├── dragEnterEvent()        # Handle drag enter
│   ├── dropEvent()             # Handle file drop
│   ├── show_message()          # Display custom message boxes
│   ├── process_file()          # Validate and load Excel file
│   └── start_process()         # Main conversion logic
│       ├── Read Excel file
│       ├── Calculate column widths
│       ├── Generate ASCII table
│       └── Save to .txt files

🤝 Contributing

Pull requests and feature suggestions are always welcome! Feel free to:

  1. Fork the repository
  2. Create a feature branch
  3. Submit a pull request

⭐ Support

If you find this tool useful, please give it a ⭐ on GitHub!