Fill Missing Cells Default Value

Pad short CSV records to an explicit width with a default string, preserving present empty fields and rejecting longer records; output materialization is bounded.

Description

A missing trailing field differs from a present empty field.

A missing trailing field differs from a present empty field. Padding a short row should add only absent positions rather than overwrite existing blanks.1

Pad short CSV records to an explicit width with a default string, preserving present empty fields and rejecting longer records; output materialization is bounded.

When to use Fill Missing Cells Default Value

Use this for the following task: Pad short CSV records to an explicit width with a default string, preserving present empty fields and rejecting longer records; output materialization is bounded.

Prepare the CSV text, decoded cells or byte values requested below. Choose delimiter and header flags explicitly when those fields are present.

How to use Fill Missing Cells Default Value and understand its results

  1. Prepare the CSV text, decoded cells or byte values requested below. Choose delimiter and header flags explicitly when those fields are present.
  2. Enter csv, delimiter, width, defaultValue using the field table, then run the tool.
  3. Read csv. Interpret flags, units, ordering and placeholder values using the rules below.
  4. Review any reported issue or failed check, correct the supplied values when appropriate, and verify the result in its intended context.
Input fieldMeaningValue type and boundsRequirement
csvCSV textstring; maximum text length 100000Required
delimiterDelimiterstring; choose ",", ";", "\t"Required
widthWidthinteger; minimum 1; maximum 10000Required
defaultValueDefault valuestring; maximum text length 100000Required

Parse records, reject rows longer than the target width and enforce output field/text budgets. Pad shorter records and re-encode all rows, including any header.2

Parse delimiters only outside quoted fields and decode doubled quotes. A quoted line break stays inside its cell; malformed quoting is returned as an input error.

The shared writer doubles interior quotes and quotes cells when needed for delimiters or line breaks, including a single empty-field record. It normally emits LF record endings without a terminal newline; any tool-specific quote-all behavior is stated above.

append width−rowLength default strings to each short row

This summarizes the declared operation. Units, indexing, inclusivity and exceptional cases are explained in the surrounding text.

Output fieldMeaningValue type
csvCSV textstring
json
{
  "input": {
    "csv": "a,b\nc\nd,",
    "delimiter": ",",
    "width": 2,
    "defaultValue": "NA"
  },
  "output": {
    "csv": "a,b\nc,NA\nd,"
  }
}

Limitations and assumptions

There is no header flag. Existing empty fields remain empty, and this does not infer which interior field was omitted.

Where CSV is parsed, the shared parser accepts comma, semicolon or tab separators, doubled quotes and quoted line breaks, with CR/LF/CRLF record endings. Blank records remain records. CSV inputs are bounded to 100000 UTF-16 units and 10000 fields. Malformed requests produce input errors. A successfully evaluated request can still contain false flags, empty result lists or a result outside the supplied threshold; those outcomes have the meanings stated above.

Alternative or Complementary methods

Choose Ragged Rows Wrong-Field-Count Finder for this operation: Report CSV records whose decoded field count differs from an explicit expected width, including header and blank records; indices are zero-based records, not lines. For a complementary task, use Drop Empty Columns Detector for this operation: Identify zero-based columns whose every data cell is exactly empty, excluding an explicit header; no columns are inferred empty when there are no data records.

Further background: Format and language reference: Fill Missing Cells Default Value.

References

  1. Format and language reference: Fill Missing Cells Default Value — RFC Editor

  2. Fill Missing Cells Default Value — tool.io

Similar or alternative tools

  • Ragged Rows Wrong-Field-Count Finder

    Report CSV records whose decoded field count differs from an explicit expected width, including header and blank records; indices are zero-based records, not lines.

  • Drop Empty Columns Detector

    Identify zero-based columns whose every data cell is exactly empty, excluding an explicit header; no columns are inferred empty when there are no data records.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies