Documents & OCRPractical guides

Excel to CSV with stale formulas: check both sheets and saved results

For old amounts in an Excel-to-CSV export, inspect saved formula results before CSV formatting. KitNelo reads existing cell text and caches rather than calculating formulas. This complete two-sheet exercise first exposes 20,24,44, then reconciles 30,24,54 against quantities and prices.

A calculator and office supplies on a desk, illustrating spreadsheet value checks
Illustrative photo: maks_d · Unsplash License

What changed: Added stale-cache, missing-cache and checked reference workbooks, with a complete multi-sheet export, independent 54 total and per-sheet reconciliation.

The practical answer

Export stale-cache.xlsx directly to observe 20,24 and total 44. The independent calculation is 3×10=30 plus 2×12=24, totaling 54. Recalculate and save a copy in a capable spreadsheet application, export again and review every sheet. Missing caches remain unresolved/blank, not invented zeros.

Complete exercise: reproduce the fault, then compare the answer

stale-cache.xlsx,missing-cache.xlsx and checked-reference.xlsx all contain Orders and Notes. They are editorial teaching fixtures: the faulty copies alter or remove only D2/D4 caches, retaining inputs and formula text. They are not a recorded real-world Excel defect.

Complete Orders records and independent answers
SKUQuantity×priceStale cacheCorrect reference
00073×10; D2=B2*C22030
A,082×12; D3=B3*C32424
TOTALD4=SUM(D2:D3)4454
Purpose of the three workbook inputs
FileExpected D2/D3/D4 readingCondition
stale-cache.xlsx20 / 24 / 44Export directly before another application recalculates it
missing-cache.xlsxBlank / 24 / blankMissing is not zero; resolve source calculations
checked-reference.xlsx30 / 24 / 54Calculated teaching answer, not a desktop Excel test

Notes records batch TRAINING-27, two detail records, independent total 54 and fictional provenance. Orders has two details plus a total row; neither Notes metadata nor TOTAL is another transaction.

Separate formula, cached result and display format

The ExcelJS formula documentation explains that the library does not calculate formula results. An XLSX file can store both a formula and a previously saved result. Changing an input without recalculation can leave that result stale. Missing results can also become empty fields; they should not silently become zero.

KitNelo converts the existing cell text for each worksheet into CSV. It is not a formula engine or a complete workbook backup. Fonts, comments, merged layout and calculation dependencies cannot be recovered from CSV.

Checking that the amount column contains two numbers is insufficient. Derive 30 and 24 from the source quantities and prices. A total that uses another stale cache can agree with incorrect details while still being wrong.

An internally consistent total can still fail

Internal agreement only

Exported amounts 20 and 24 add correctly to 44

Input-based verification

Original inputs give 3×10+2×12=54; the first line is short by 10

Return to independent inputs instead of using one potentially stale result to certify another.

Follow the path: faulty export, recalculated copy, fresh export

Current CSV output includes a UTF-8 BOM. Parse it properly; if the first header has an invisible extra character, inspect the receiver’s BOM handling. Sheets export separately; resolve sanitized filename collisions at the source. Continue with CSV/JSON record checks, or the column-aligned merge guide when appending other sources.

  1. Open Excel document tools, choose Excel to CSV and convert stale-cache.xlsx. Do not open/save it in a recalculating application first if you want to observe the injected fault.
  2. Download and unpack excel-csv.zip. Find both Orders.csv and Notes.csv. Orders has a header, two details and one TOTAL row, with 20,24,44. Independently calculate 54 from quantities/prices to locate the missing 10 in record 1.
  3. Open the source in a trusted formula-capable spreadsheet program, confirm inputs/references, recalculate and save a new copy. Automatic calculation may happen immediately on opening; do not alter global settings to preserve the fault.
  4. Export the saved copy and verify Orders 30/24/54 plus the Notes batch context. Without a formula engine, use checked-reference.xlsx to practice reading/reconciliation, without claiming a native Excel recalculation was performed.
  5. Try missing-cache.xlsx: D2/D4 must be blank and D3 must remain 24. Keep unresolved status until reliable results exist; do not substitute 0 or a formula string for an amount.

Do not add the total twice or reinterpret an identifier

Sum only the two detail amounts:30+24=54. Adding the TOTAL row again gives 108, a double count. Three CSV data rows do not mean three transactions; state the record unit in the handoff.

Preserve SKU 0007 and A,08 character for character. A,08 needs CSV quoting. If double-click opening shows 7, the receiving application may have inferred a number. Inspect the raw CSV, then import the ID column as text using the CSV-to-Excel type checks.

Complete two-CSV handoff checks

  • Both Orders.csv and Notes.csv exist with clear sheet-to-file mapping.
  • Details are 30 and 24; TOTAL is 54, with details aggregated only once.
  • Keep 0007 and A,08 intact and distinguish a missing cache from a real zero.
  • Retain the faulty input, recalculated copy and CSV version mapping, including calculation conditions and unresolved items.

Choose the correct place to repair a failure

Use this workflow for static records, not macros, formulas, charts or cross-sheet relationships. Test the receiving system with the synthetic fixture rather than sensitive customer or billing files.

Wrong amounts require checking source caches and references. Shifted fields require checking quoting and encoding. Missing sheets require inspecting archive members and name collisions. These faults occur at different boundaries; repeating conversion does not repair incorrect source data.

Common questions

Can I use formula text when the cached result is missing?

A formula is not a calculated amount. Obtain a valid result in trusted software, or record the unmet dependency.

Why does 0007 become 7 when I open CSV?

The receiving application may infer a numeric type. Inspect the raw CSV first, then import the column as text.

Can two sheets become one CSV automatically?

The current workflow packages each sheet separately. Define column alignment and source fields before creating a combined table.

Further reading & sources

Put the guide into practice

Open the relevant tool, preview the result and check your exported file.

Newer articles on this topic

Continue with a newer article that refers to this guide or explainer.

Related articles