A Python script that processes raw open orders data from an e-commerce website and generates a formatted Excel report with enhanced readability and proper formatting.
- ✅ Adds sequential numbering to each order
- ✅ Formats dates to include weekday names (e.g., "Saturday, 2025-12-16")
- ✅ Generates professionally formatted Excel reports
- ✅ Applies consistent styling with headers, borders, and alignment
- ✅ Automatically adjusts column widths to fit content
- ✅ Formats currency values with EGP suffix
- ✅ Creates reports with descriptive filenames
Before running the script, ensure you have Python 3.x installed on your system.
Install the following Python packages using pip:
pip install pandas openpyxlOr install from the provided requirements file:
pip install -r Requirements.txt- Clone or download this repository to your local machine
- Navigate to the project directory
- Install the required dependencies as mentioned above
- Ensure you have a raw orders CSV file named
Shopify Open Orders Raw.csvin the project directory
The script expects an input CSV file named Shopify Open Orders Raw.csv with the following possible columns:
Name(will be renamed toOrder)Created At(date/time of order creation)Amount(order amount, may include currency symbols)Currency,Card Type,Payment Method,Status,Gateway,Kind,Order(these will be removed if present)
- Place your raw orders CSV file as
Shopify Open Orders Raw.csvin the project directory - Run the script:
python OpenOrders.py
- Find the generated report in the
Reportsdirectory with the filename format:Shopify Website Open Orders _ YYYY-MM-DD.xlsx
The script generates a professionally formatted Excel file with:
- Sequential numbering column (#)
- Order number
- Date with weekday (e.g., "Saturday, 2025-12-16")
- Time of order creation
- Amount with EGP currency formatting
The Excel file includes:
- Header styling with green background
- Proper alignment (center for most fields, right-aligned for amounts)
- Borders (thick for headers and outer edges, dotted for inner cells)
- Automatic column width adjustment
- Proper date and time formatting
- Currency formatting for amounts
The script contains configurable options at the top:
INPUT_FILE: Name of the input CSV fileOUTPUT_PATH: Directory where reports will be saved- Various styling options can be modified as needed
- File not found error: Ensure
Shopify Open Orders Raw.csvexists in the project directory - Permission error: Check that you have write permissions to the Reports directory
- Package import error: Verify that pandas and openpyxl are properly installed
If you encounter issues with dependencies, try:
pip install --upgrade pandas openpyxlOpen Orders Report/
├── OpenOrders.py # Main script
├── Shopify Open Orders Raw.csv # Input file (not included in repo)
├── Requirements.txt # Python dependencies
├── Reports/ # Output directory
│ └── Shopify Website Open Orders _ YYYY-MM-DD.xlsx
└── README.md # This file
The script can be customized by modifying:
- Column removal list (
DROP_COLS) - Output filename format
- Styling elements (fonts, colors, borders)
- Column order
- Number formatting
This project is open source and available under the MIT License (see LICENSE file for details).