Skip to content

2001J/Excel-automation-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Excel Automation Script

Python License

A Python script that automates the cleaning and preprocessing of Excel files. This tool removes empty rows, normalizes column names, and trims whitespace from cells.

Features

  • Remove completely empty rows
  • Normalize column headers (lowercase, trimmed)
  • Trim leading/trailing whitespace from text cells
  • Generate cleaned Excel output file

Requirements

  • Python 3.8
  • pandas
  • openpyxl

Installation

Clone the Repository

git clone https://github.com/2001J/Excel-automation-script.git
cd Excel-automation-script

Create Virtual Environment

macOS/Linux:

python3 -m venv venv
source venv/bin/activate

Windows:

python -m venv venv
venv\Scripts\activate

Install Dependencies

pip install -r requirements.txt

Usage

  1. Place your Excel file in the project directory as sample_input.xlsx or modify the input_file variable in the script.

  2. Run the script:

python clean_excel.py
  1. The cleaned output will be saved as cleaned_output.xlsx

Project Structure

Excel-automation-script/
├── clean_excel.py          # Main script
├── requirements.txt        # Python dependencies
├── sample_input.xlsx       # Sample input file
├── .gitignore             # Git ignore rules
└── README.md              # Documentation

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

This script automates cleaning Excel files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages