Skip to content

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.

License

Notifications You must be signed in to change notification settings

AhmadMWaddah/Shopify_Open_Orders_Report

Repository files navigation

Shopify Website Open Orders Report Generator

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.

Features

  • ✅ 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

Prerequisites

Before running the script, ensure you have Python 3.x installed on your system.

Required Packages

Install the following Python packages using pip:

pip install pandas openpyxl

Or install from the provided requirements file:

pip install -r Requirements.txt

Installation

  1. Clone or download this repository to your local machine
  2. Navigate to the project directory
  3. Install the required dependencies as mentioned above
  4. Ensure you have a raw orders CSV file named Shopify Open Orders Raw.csv in the project directory

Input File Format

The script expects an input CSV file named Shopify Open Orders Raw.csv with the following possible columns:

  • Name (will be renamed to Order)
  • 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)

Usage

  1. Place your raw orders CSV file as Shopify Open Orders Raw.csv in the project directory
  2. Run the script:
    python OpenOrders.py
  3. Find the generated report in the Reports directory with the filename format: Shopify Website Open Orders _ YYYY-MM-DD.xlsx

Output

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

Configuration

The script contains configurable options at the top:

  • INPUT_FILE: Name of the input CSV file
  • OUTPUT_PATH: Directory where reports will be saved
  • Various styling options can be modified as needed

Troubleshooting

Common Issues:

  1. File not found error: Ensure Shopify Open Orders Raw.csv exists in the project directory
  2. Permission error: Check that you have write permissions to the Reports directory
  3. Package import error: Verify that pandas and openpyxl are properly installed

Dependencies:

If you encounter issues with dependencies, try:

pip install --upgrade pandas openpyxl

File Structure

Open 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

Customization

The script can be customized by modifying:

  • Column removal list (DROP_COLS)
  • Output filename format
  • Styling elements (fonts, colors, borders)
  • Column order
  • Number formatting

License

This project is open source and available under the MIT License (see LICENSE file for details).

About

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages