The project focused on automating the calculation of infrastructure-related charges for telecommunications tower operations, including antenna installation activities.
It involved processing large Excel files containing thousands of records, validating and normalizing data, calculating charges based on pricing categories, and generating output files while fully preserving the original Excel formatting.

Why

Infrastructure billing management is a critical operation for telecommunications infrastructure companies, as it requires cumulative billing with complete historical tracking per tower, cross-category calculations, and the processing of files containing tens of thousands of rows.

Manual Excel-based workflows were leading to calculation errors, billing delays, and limited traceability at a historical level. Through automation, the business achieved significantly improved speed, accuracy, and full auditability for every generated charge.

How

The system was developed in Python using a hexagonal architecture (ports-and-adapters pattern), leveraging high-performance tools for reading and processing large Excel datasets.

The application:
  • Reads and validates the input Excel file
  • Normalizes inconsistent data
  • Applies readiness and eligibility filters
  • Calculates cumulative charges for each billing category
  • Writes results back to the Excel file while fully preserving formatting
The platform also includes a web-based interface that allows users to:
  • Upload files
  • Monitor processing progress in real time through WebSockets
  • Download the processed output file

Challenges

The main challenges of the project included:
  • Mixed Greek and Latin characters within source data
  • Cumulative billing logic requiring full historical reconstruction per tower in order to avoid double charging already billed thresholds
  • Handling negative entries and adjustments
  • Preserving complete Excel formatting
  • Scaling the solution for files containing tens of thousands of rows while maintaining fast processing times and stable memory usage

Solution

The implemented solution included:
  • Automated data normalization with character mapping and matching logic
  • Token-based eligibility and validation system
  • A two-stage processing architecture:
    • Polars for high-performance in-memory data processing
    • OpenPyXL for writing results while preserving full Excel formatting
  • A web application built with FastAPI and React, featuring real-time streaming logs through WebSockets
  • YAML-based configuration for pricing rules, enabling business users to modify pricing catalogs without changing the application code

Results

  • Processing of tens of thousands of records and calculation of charges for hundreds of billing entries in seconds instead of hours of manual work
  • Complete elimination of calculation errors through automated billing rules and hundreds of automated tests
  • Full auditability, with every charge accompanied by validation comments explaining the calculation or the reason for zero billing
  • 100% normalization accuracy for inconsistent source data
  • Immediate usability of the output file by the accounting department thanks to complete Excel formatting preservation
  • 90% reduction in billing cycle completion time, freeing operational resources for higher-value tasks
  • Extensible architecture supporting new billing categories and future phases such as file comparison, maturity detection, and historical charge tracking without requiring system redesign