Lorixen.
EN

Catching Spreadsheet Cells That Lose Their Tail Before the Export Leaves

Long notes, descriptions and message histories can exceed what a receiving spreadsheet program will keep in a single cell. If the cut happens quietly on the other side, nobody knows text is missing. This article proposes a check before export plus a written policy. Treat the limit as a configured value you confirm from the documentation of the program your users actually open. This article does not state any program's limit.

The artifact: a long-cell witness and a policy

The witness is a purpose-built test row that sits in your export fixture. Its text is generated to have a known length just above the configured limit, and it ends with a visible end marker such as END-OF-TEXT. After a trial export is opened in the target program, a person checks whether the end marker is still visible. If it is missing, the real limit is below your configured value, and you lower the configuration.

The policy has three parts:

  1. How length is counted. Decide whether you count characters as the program counts them, which may differ from bytes and from visible symbols. Include one witness row with accented letters and one with emoji, because counting methods may differ.
  2. What the limit is, as a named setting.
  3. What happens on overflow, chosen per column from the options below.

Overflow options

Block: the export stops and lists the rows and columns over the limit. Use this for columns where partial text is misleading, such as legal wording or instructions.

Split: the text continues in additional columns named with a continuation suffix, and a header marks the sequence. Use this when the receiver can reassemble.

Truncate with disclosure: cut at the limit minus the length of a visible marker such as [TRUNCATED, full text in system], and write the row number to a report file. Use this only where a short preview is acceptable.

No option is silent. Choose one per column and record it.

Worked hypothetical example

Configured limit: 1,000 characters. A notes column has five rows with lengths 240, 1,000, 1,001, 3,500 and 0.

Rows at or under 1,000: 240, 1,000 and 0, so three rows pass. A row exactly at the limit passes. Rows over: 1,001 and 3,500, so two rows are flagged.

With the block policy: export stops, the report names rows 3 and 4, and tells the operator two of five rows exceed the limit.

With the truncate policy and a 40 character marker: rows 3 and 4 are cut to 960 characters plus the marker, giving 1,000. The report lists rows 3 and 4, the original lengths 1,001 and 3,500, and the export header notes that two cells are shortened.

With the split policy and two columns: row 3 becomes 1,000 plus 1, and row 4 would need 3,500, which exceeds two columns of 1,000. The branch must therefore fail or add columns up to a stated maximum. Here the rule is: if the maximum of three columns cannot hold the text, block that row. Row 4 needs four columns, so it blocks, while row 3 splits. The report states one row split and one row blocked.

Stop conditions

  • Stop the export when any block-policy column has an overflow.
  • Stop when the witness end marker is not found in a trial after the limit was changed. The limit is unverified.
  • Do not repair by silently shortening other columns to make the file smaller.

Proposed acceptance tests (not yet performed)

  • Export the five row fixture and check that the report counts 3 passing and 2 over.
  • Export a row of exactly 1,000 characters and check that it passes untouched, then 1,001 and check that it is flagged.
  • Open a trial file in the receiving program and check that the witness end marker is visible.
  • Include accented and emoji rows and check the counting method gives the same length as the program shows.
  • Under the split policy, check row 4 blocks while row 3 splits.

Limits

The check cannot predict every program a recipient might use. State the target program in the export screen and keep the full text available in your own system.

Sources

    WhatsAppLet’s talk