Task architecture

Read XLSX Cell Values Without Recalculation

Preserve available formula expressions, cached values, cell types, shared-string provenance, direct date values, and numeric-date context in a read-only workbook projection.

Review status: Fact and editorial QA complete; owner review pending · 2026-10-08 · Fact IDs: ANDROID-XLSX-READ-2026-10, ANDROID-PRIVACY-01, PRIVACY-01

Direct answer

Treat an XLSX workbook as a structured Open XML package, not as a rectangular array of already interpreted values. A worksheet cell can refer to a shared string by index, contain an inline string, carry a number or Boolean, represent an error, or contain a formula and a cached result. The reader should preserve the raw cell representation and its derived display value separately. A library that returns a convenient string may hide whether the workbook contained a formula, a cached value, or a shared-string lookup. A SpreadsheetML `f` element can carry formula text, and a cell can also have a `v` element containing a cached result. Formula text is not necessarily present on every formula cell: a shared-formula follower may use `t="shared"` and an `si` group index without inline expression text. Resolve its expression from the matching master cell using the exact parser contract; if the master is missing, ambiguous, or outside the supported range, report it as unresolved. A cached value is historical workbook content, not a result recomputed at import time and not proof that the formula is current. Missing or stale caches, external references, unsupported functions, and unresolved shared formulas leave the current result unknown unless a separately named engine evaluates it. A read-only importer should not open links or invoke a calculation engine as a side effect. String interpretation also needs package context. A cell whose type points to the shared string table stores an index, not the human text itself; an inline string is represented in the worksheet. Rich text can contain text runs, phonetic `rPh` runs, and `xml:space` whitespace metadata. Do not concatenate phonetic hints into base text. Preserve whitespace metadata where the parser exposes it and test a declared join policy against leading/trailing whitespace and run boundaries; do not imply that a library applies a particular policy by default. Boolean and error cell types are not ordinary numeric values. Preserve the cell type and raw content even when producing a normalized text view. A cell is not automatically a date because its value looks numeric or its style resembles a date. SpreadsheetML supports a direct date form using cell type `t="d"` with an ISO 8601 value, as well as numeric serials interpreted with a workbook date system and style. Verify that the selected library supports the direct date type; otherwise classify it as unsupported instead of coercing it to a number. For numeric serials, styles and number formats are presentation evidence, not a universal typed-date declaration. Excel preserves the 1900-system compatibility behavior that treats 1900 as a leap year; serial 60 therefore represents the fictional 1900-02-29, not a Gregorian date. A workbook-level 1904 flag changes the serial epoch. Keep raw value, date-system flag, style, and interpretation together, and report ambiguity rather than silently shifting a date. Formula expressions can refer to other cells, named ranges, functions, and external workbook links. A read-only importer should return an inline expression only when the cell has one; for shared formulas it should report a resolved expression only after finding the matching master and testing the parser’s relative-reference behavior. It should classify absent caches separately and avoid refreshing links, recalculating formulas, changing workbook calculation settings, or saving the source. If a consumer needs a value, make the policy explicit: use a stored cache labeled “as last calculated,” show a resolved formula when available, or reject the cell as unresolved. Never present a cache as freshly calculated. Pin the actual Android-compatible library and version before defining support. Open XML examples in Microsoft documentation describe SpreadsheetML and the Open XML SDK; they do not prove that a .NET API runs on Android or that another library has the same behavior. Record parser coordinates, transitive dependencies, supported workbook features, and whether parsing occurs from a user-selected URI. A ZIP package is only a container boundary: apply entry-count, expanded-byte, compression-ratio, XML-depth, cell-count, shared-string, and elapsed-work limits through APIs the selected library actually exposes. Do not build an ad hoc XML or ZIP parser to fill missing library features. A safe read-only result is a provenance-bearing projection. For each cell, record workbook and sheet identity, coordinate, declared cell type, raw value, formula kind and shared-group metadata when present, whether an expression was resolved, shared-string lookup, style reference, date-system context, and interpretation status. Keep formula expression, cached result, and displayed string distinct. Do not claim that parsing preserved macros, external connections, formatting, comments, or every workbook feature unless the exact library test proves it. Never mutate the selected source document during import. Use a synthetic workbook with shared and inline strings; rich text containing phonetic `rPh` runs, preserved-space markers, and boundary whitespace; numeric, Boolean, error, and `t="d"` ISO-date cells; normal formulas; and shared-formula master/followers where a follower omits formula text. Include an absent master, cached/absent/stale results, external references, and named formulas. Add ordinary numeric cells and date-formatted cells, both workbook date systems, and 1900-system serial 60. Open and close through the exact Android build and library, compare package parts with the returned projection, and verify the source bytes stay unchanged. Do not connect live external workbooks or use private data. Acceptance is an interpretation contract, not a claim about model quality. The report should say which sheets and cells were read, how formulas and cached values were handled, which cell kinds were unsupported, and whether any limit or parser error occurred. A model may still misunderstand correctly imported text; a successful parser run does not establish that the workbook is accurate, safe to act on, or supported by Cove. This guide is a generic Android method and does not assert that Cove currently imports XLSX.

A workbook contains an old cached total

A user selects a workbook for local expense review. One total cell contains a formula linked to another sheet, but its cached result predates a recent edit and the workbook also contains an external reference. The import must not launch a desktop calculation engine or change the selected file.

Decision

Keep formula, cached result, cell type, source coordinate, and cache status distinct. Use a cache only under an explicit stale-value policy; otherwise mark the amount unresolved and request user review.

Expected outcome

The derived worksheet view can be audited back to the original cell and clearly shows whether an amount is literal, cached, interpreted as a date, unsupported, or unresolved.

Evidence to collect

The claim becomes reviewable only when the following evidence is attached to the same artifact and test run:

  • Pinned Android parser and workbook feature profile
  • Formula/master/cache and date-system fixtures
  • Source-byte preservation and unresolved states

Task quality needs a versioned corpus and acceptance rules. Fluent sample output is not an accuracy result.

Implementation workflow

  1. Pin the parser and import boundary. Record exact Android dependency coordinates, resolved version, workbook features, and the user-selected URI path. Confirm the library exposes formula type/shared-group metadata, cached values, cell types, shared strings, rich-text details, direct date types, styles, and workbook date-system flags required by the contract.
  2. Resolve cell content without flattening provenance. Read shared-string indices and inline strings from their actual package parts. Keep base text runs separate from phonetic runs; preserve significant whitespace where exposed and test the declared join policy. Keep Boolean, error, numeric, formula, cached value, and display output as separate fields.
  3. Interpret dates by their declared representation. Detect direct `t="d"` ISO dates separately from numeric serials; accept the former only if the exact parser exposes them correctly. For numeric values, use workbook date-system and style/number-format evidence. Test both systems, ordinary numeric cells, and serial 60 in the 1900 system.
  4. Resolve shared formulas and qualify caches. For `t="shared"` cells, locate the master using its `si` group and test the selected library’s relative-reference behavior. If the expression cannot be resolved uniquely, report it as unresolved instead of claiming inline formula text exists. Mark cache presence and staleness separately.
  5. Bound and exercise the real package path. Use the selected library’s supported limits for package entries, expanded bytes, XML depth, shared strings, rows/cells, and work time. Run synthetic fixtures for formulas, caches, strings, errors, date systems, missing parts, unsupported features, cancellation, and byte-identical source preservation.

Keep each transition observable. A failure should identify the stage, artifact, runtime, and recovery action without logging private user content.

Acceptance criteria

  • Formula text, cached result, raw value, cell type, and interpreted display value remain distinguishable; no cache is described as a fresh calculation.
  • Direct `t="d"` ISO dates and numeric serials are treated as distinct representations; direct dates are supported only when the exact parser exposes them, and numeric values use workbook date-system and style evidence.
  • A shared-formula follower without inline expression resolves through its matching master or is reported unresolved; serial 60 in the 1900 system is not reported as a real Gregorian date.
  • Shared strings, inline strings, rich text versus phonetic runs, significant whitespace, Boolean values, errors, missing/stale caches, external references, and unsupported features have explicit fixture outcomes.
  • The exact Android dependency and its observable parser surface are tested; Open XML SDK documentation is not presented as Android compatibility evidence.
  • The selected source remains byte-identical, package expansion and parsing work are bounded through real library controls, and no external formula link or calculation engine is invoked.

Decision table

DimensionChoice or evidenceHow to interpret it
Literal value cellPreserve type and raw value before display formatting.The visible string can depend on style, locale, and number format; it is not always the stored representation.
Formula or shared-formula followerKeep inline text, resolved master expression, and cache as separate observations.A shared follower may not contain inline text; unresolved master lookup is not a displayable formula.
Formula without a usable cacheMark unresolved or request review under the declared policy.A read-only parser cannot claim a current result without a supported calculation step.
Direct `t="d"` date cellUse ISO 8601 content only when the selected parser supports this type.This differs from a numeric serial and does not prove Android-library support.
Numeric date-like cellInterpret with workbook date-system and style evidence.Not every number is a date; Excel’s 1900 compatibility behavior includes fictional serial 60.
External workbook formulaKeep the reference inert and report its cache/status.Import does not authorize network access, link refresh, or source mutation.

Failure patterns to prevent

  • Presenting a cache as freshly calculated
  • Assuming every formula has inline text or every date is numeric
  • Treating Open XML SDK examples as Android runtime evidence

Also prevent silent fallback, unpinned artifacts, missing cancellation, and conclusions that combine unlike configurations. Store unsuccessful runs alongside successful ones.

Minimum reproducibility record

LayerRecord
DeviceManufacturer, model, chipset, RAM class, operating-system build
SoftwareApplication version and git commit
ModelFamily, variant, revision, format, file length, hash, quantization
RuntimeName, revision, requested backend, observed backend evidence
WorkloadFixture revision, input hash, prompt hash, output policy
OutcomeCompleted, failed, cancelled, fallback, and privacy-safe diagnostics

Release checklist

  • ☐ The primary query is answered without an unsupported number.
  • ☐ Every artifact and runtime is pinned.
  • ☐ The representative task and failure policy are explicit.
  • ☐ Lifecycle, cancellation, cleanup, and fallback are tested.
  • ☐ User-content and network boundaries are documented.
  • ☐ Result wording applies only to the recorded configuration.
  • ☐ The page links to raw method or evidence when results are added.

Sources and related evidence

Chinese deployment and troubleshooting content is organized in the .奇连 AI 端侧专题.

Frequently asked questions

Does every XLSX formula cell contain readable formula text?

No. A shared-formula follower can identify its master through shared-group metadata without inline formula text. Resolve it only through a tested parser path; otherwise report unresolved. A cached result may also be absent or stale.

Are all XLSX dates numeric serials?

No. SpreadsheetML also supports `t="d"` cells with ISO 8601 text. Accept that representation only if the exact parser exposes it; numeric serials are a separate form that needs workbook date-system and style evidence.

Should import recalculate formulas or refresh linked workbooks?

Not in a read-only import contract. Recalculation and link refresh can change data or trigger external behavior. Keep formula text and cached value separate; a calculation feature needs its own explicit engine, policy, and tests.

Do Microsoft Open XML examples prove the same API works on Android?

No. The documentation establishes SpreadsheetML structures and Open XML SDK behavior in its stated environment. Record and test the exact Android-compatible library and version before claiming feature support.