Skip to content

NullCoreX/Excel-To-Table

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

102 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📊 Excel To Table

C++ Qt Platform

ExcelToTable is a lightweight, elegant desktop application built with Qt6 and C++17 that instantly transforms Excel spreadsheets into beautifully formatted ASCII tables with Unicode box-drawing characters — perfect for embedding data in documentation, code comments, emails, or terminal output.

🎯 Perfect for: Developers, technical writers, data analysts, and anyone who needs to present tabular data in plain-text environments.


🙌 Who is this for?

  • 📝 Technical writers – Drop Excel tables directly into markdown, README files, or documentation with perfect formatting.
  • 💻 Software developers – Quickly convert spreadsheet data into ASCII tables for code comments or console output.
  • 📊 Data analysts – Present quick data snapshots in emails, Slack messages, or commit messages without screenshots.
  • 📚 Researchers & students – Transform research data into clean tables for plain-text theses or notes.
  • 🖥️ CLI enthusiasts – Get beautifully structured tables right in your terminal with zero markup.

💡 Why use ExcelToTable?

Problem Solution
❌ Sharing Excel files requires specific software ✅ Output is universal plain text – readable anywhere
❌ Tables in plain text look messy and unaligned ✅ Beautiful Unicode box-drawing characters with perfect alignment
❌ Manual formatting takes forever Drag & drop – one click conversion in milliseconds
❌ Copying data from Excel loses structure ✅ Preserved column widths, padding, and row separators
❌ Need to embed tables in code or docs ✅ Ready-to-paste ASCII output with professional styling

✨ Features

Feature Description
🖱️ Drag & Drop Simply drag an Excel file onto the window – no browsing dialogs
🎨 Beautiful ASCII Tables Output uses Unicode box-drawing characters (┌ ┐ └ ┘ ├ ┤ ┬ ┴ ┼)
📏 Auto-Sizing Columns Column widths are calculated automatically based on content
Instant Conversion One click converts the entire spreadsheet to a formatted text file
📂 Smart Output Path Output file is automatically named filename_output.txt in the same directory
Wide Format Support Supports .xlsx, .xls, and .xlsm files
🧹 Empty Row Handling Automatically detects and stops at the last row with actual data
🛡️ Safe Operations Read-only on source files – your original Excel data is never modified
🎛️ Modern UI Clean gradient design with visual drag-and-drop feedback
📊 Large File Support Handles spreadsheets up to 100,000 rows and 1,000 columns

📸 Screenshot

(Add a screenshot of your app here)


🛠️ Requirements

Before building, make sure you have the following installed:

  1. Qt6 (with Core, Gui, and Widgets modules)
  2. C++17 compatible compiler (GCC, Clang, MSVC)
  3. CMake (version 3.16 or higher)
  4. QXlsx (included as a submodule – no additional setup needed)

🚀 Getting Started

1️⃣ Clone the repository

git clone https://github.com/yourusername/ExcelToTable.git
cd ExcelToTable/

2️⃣ Initialize QXlsx submodule

git submodule update --init --recursive

3️⃣ Build with CMake

cmake -B build
cmake --build build

4️⃣ Run the application

./build/bin/ExcelToTable

🧩 How It Works

  1. Drag an Excel file (.xlsx, .xls, .xlsm) onto the drop zone.
  2. The app automatically fills in the output path (filename_output.txt).
  3. Click the convert button (or press Enter).
  4. Your formatted ASCII table is saved instantly!

💡 The output is a plain .txt file saved in the same folder as your source Excel file. Open it in any text editor, terminal, or paste it directly into code comments.


📁 Output Example

Given this Excel sheet:

Name Age City
Alice 28 New York
Bob 34 Los Angeles
Charlie 22 Chicago

The generated ASCII table:

┌──────────┬───────┬───────────────┐
│   Name   │  Age  │     City      │
├──────────┼───────┼───────────────┤
│  Alice   │  28   │   New York    │
├──────────┼───────┼───────────────┤
│   Bob    │  34   │  Los Angeles  │
├──────────┼───────┼───────────────┤
│ Charlie  │  22   │    Chicago    │
└──────────┴───────┴───────────────┘

🏗️ Project Structure

ExcelToTable/
├── CMakeLists.txt          # Build configuration
├── main.cc                 # Application entry point
├── include/
│   ├── ExcelReader.h       # Excel file reading interface
│   ├── TableFormatter.h    # ASCII table formatting engine
│   └── MainWindow.h        # Main application window
├── src/
│   ├── ExcelReader.cc      # QXlsx integration & data extraction
│   ├── TableFormatter.cc   # Box-drawing character table generation
│   └── MainWindow.cc       # UI logic, drag & drop handling
├── ui/
│   └── ExcelToTable.ui     # Qt Designer UI file
├── assets/
│   ├── Button.png          # Convert button icon
│   ├── Excel.png           # Excel file icon
│   ├── Loading.png         # Loading state icon
│   └── Text.png            # Text output icon
├── resources.qrc           # Qt resource file (icons)
└── QXlsx/                  # Excel reading library (submodule)

🎨 Unicode Box-Drawing Engine

The TableFormatter class constructs tables using Unicode box-drawing characters with precise alignment:

  • Horizontal lines with and junctions
  • Custom borders for top (┌ ┬ ┐), middle (├ ┼ ┤), and bottom (└ ┴ ┘)
  • Centered cell content with automatic padding calculation
  • Zero external dependencies – pure Qt string manipulation

📊 Supported File Types

Format Extension Support
Excel Workbook .xlsx ✅ Full support
Excel 97-2003 .xls ✅ Full support
Excel Macro-Enabled .xlsm ✅ Full support

⭐ Support

If you find this tool useful, please give it a ⭐ on GitHub! Have a feature request or found a bug? Open an issue.


About

A C++/Qt6 application that converts Excel spreadsheets (.xlsx, .xls, .xlsm) into beautifully formatted ASCII tables using box-drawing characters. Features drag-and-drop support and an intuitive GUI.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors