Shample Intel
Menu
Catalog quality guide

Export formula-like text without intentionally evaluating it

Inspect actual quoting and apostrophe-prefix output for formula-leading SKU and description text, with clear spreadsheet safety limitations.

Review and exportUpdated Guide slug: csv-formula-export-safety

The issue to look for

Spreadsheet applications can interpret cells starting with formula characters as executable formulas, even when a CSV field is quoted. A file received from an external source should not be trusted just because it parses.

What this check can tell you

The fixture includes the actual exported CSV, not only a preview of records. It demonstrates that export escaping is a separate stage from feed analysis.

A transparent review

  1. Inspect the synthetic =2+2 SKU and @sample description as untrusted text.
  2. Run the analyzer without executing spreadsheet formulas.
  3. Compare the exported cells with their prefixed apostrophes and doubled CSV quote handling.
  4. Import external data using Text columns and follow your organization's spreadsheet security controls.

How to read the result

  • The exporter prefixes cells whose leading content matches formula-trigger characters =, +, - or @, including leading whitespace/control cases. It then quotes each field and doubles internal quotes. The result intentionally differs from the raw source for those cells.
  • The XLSX reader follows a different rule: formula cells cause a clear rejection, and formulas are never evaluated. Export a trusted workbook's calculated values as CSV when a values-only input is appropriate.

Limits to keep in view

  • No export transformation guarantees safety in every spreadsheet application or subsequent editing workflow.
  • Re-saving a file may remove protective formatting; review the final artifact.
  • Formula protection is not malware scanning or permission to enable active content.
Illustrative sample

Synthetic fixture: synthetic-formula-export.csv

This small synthetic example makes the transformation and observation visible. It is an educational illustration, not a claim that a supplier file or external registry was verified.

Fixture ID
formula-export
Published fixture reference
formula-export
Filename
synthetic-formula-export.csv
Encoding
UTF-8
Options
{"repairUpcs":true,"removeZeroStock":false,"removeZeroCost":false}

Input

SKU,Description,Qty
=2+2,"@sample",1

Output

{
  "checks": {
    "totalRows": 1,
    "retainedRows": 1,
    "repairCount": 0
  },
  "cleanedRows": [
    {
      "SKU": "=2+2",
      "Description": "@sample",
      "Qty": "1"
    }
  ]
}

Exported CSV (UTF-8 BOM omitted here):
"SKU","Description","Qty"
"'=2+2","'@sample","1"

Observation: The CSV exporter quotes each cell and prefixes formula-leading content with an apostrophe. This is a defensive export transformation, not formula evaluation.

Download synthetic fixture

Sources