Technical document

Batch Design for Reconciling Excel Aggregations and DB Results

We will organize the design perspectives for batch processing that compares aggregated values from Excel with aggregated values from a web application's database and detects differences.
Data Processing / Reconciliation~10 minPublication Date September 22, 2026Update date September 22, 2026
Batch Design for Reconciling Excel Aggregations and DB Results

Summary

Key points of this document

  • Where are the design challenges?
  • How to define boundaries
  • Details effective in implementation

Overview

During the migration from Excel to a web application, it's necessary to compare both aggregation results. Having a reconciliation batch that can trace the cause when differences arise makes migration decisions easier. In reconciling Excel aggregations and DB results, it's more important to be able to classify the reasons for differences than to hastily decide which one is correct.

Where are the design challenges?

When moving aggregation functions to a web application, the numbers might not match the existing Excel. The causes can be not only calculation errors but also differences in target periods, exclusion conditions, rounding, and input data.

If Excel's formulas are complex or include manual corrections, perfect reproduction becomes difficult. In reconciliation, it's necessary to decide which differences to tolerate and which to target for correction.

When comparing existing Excel aggregations with new DB aggregations, the numbers may not perfectly match. These differences arise not only from implementation errors but also from rounding, closing ranges, manual corrections, old formulas, and differences in exclusion rules.

How to define boundaries

In the reconciliation batch, Excel-derived data and DB aggregation results are compared using the same key and period. Differences are classified into categories such as amount difference, count difference, out of scope, key mismatch, and rounding difference.

In design, Excel files are treated not merely as comparison sources but as existing specifications including calculation rules. The reconciliation batch saves not only the aggregation results but also the conditions under which they were aggregated, and classifies the differences.

Details effective in implementation

When importing, save the original Excel file, sheet name, row number, and import time. The DB aggregation side recalculates using SQL or aggregation functions and saves the comparison results to a table. Reports can be viewed in CSV or on screen.

In a TypeScript batch, separate Excel reading, normalization, DB aggregation, reconciliation, and report generation. Difference records should have key, excel_value, db_value, diff_type, tolerance, and note to allow later review and judgment.*Normalize Excel's blank cells, string numbers, and date serials before comparison.*Maintain a tolerance for each item and separate rounding differences from actual differences.

  • If there are manual corrections, import the correction values as separate data and do not overwrite the original values.
  • Observe how it breaks
  • In verification, prepare test data with known differences and check if the classification is as expected. Since rounding rules and date boundaries are particularly prone to differences, include boundary value tests.

In verification, use multiple representative past months to confirm if the classification of differences is appropriate. Instead of just looking at the match rate, review whether the differences are explainable, whether they are implementation differences that need correction, or business rule differences.

Discarded options and trade-offs

Creating a reconciliation batch increases migration costs. However, automating difference classification leads to faster migration decisions than having people investigate the reasons for mismatched numbers every time.

Aligning too closely with Excel will carry over old errors to the new system. Leaning too much towards DB aggregation means you can't communicate with existing numbers on the ground. During the migration period, it's realistic to proceed by aligning both and reducing the reasons for differences.

Decision criteria to leave on site

In Excel migration, it's important not only whether the numbers match, but also to be able to explain why they don't. A reconciliation batch becomes a practical tool for building trust during migration.

The role of a reconciliation batch is not just to match numbers. Its essence is to classify differences and create the material for deciding which rules are correct.

In Excel migration, it's important not only whether the numbers match, but also to be able to explain why they don't. A reconciliation batch becomes a practical tool for building trust during migration.

The role of a reconciliation batch is not just to match numbers. Its essence is to classify differences and create the material for deciding which rules are correct.

Technical documents

We will continue to increase technical documentation.

We will continue to organize our thoughts on AI, cloud, business app development, requirements definition, and operational design into documents.

Go to technical documentation list