Multiline Quoted Cell Line Counter
Find decoded CSV cells containing CR or LF and report their one-based line counts, counting CRLF as one break; positions are zero-based record and column indices.
Description
A decoded CSV cell may contain several lines while belonging to one record.
A decoded CSV cell may contain several lines while belonging to one record. Counting CRLF as one break avoids double-counting Windows line endings.1
Find decoded CSV cells containing CR or LF and report their one-based line counts, counting CRLF as one break; positions are zero-based record and column indices.
When to use Multiline Quoted Cell Line Counter
Use this for the following task: Find decoded CSV cells containing CR or LF and report their one-based line counts, counting CRLF as one break; positions are zero-based record and column indices.
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 Multiline Quoted Cell Line Counter and understand its results
- Prepare the CSV text, decoded cells or byte values requested below. Choose delimiter and header flags explicitly when those fields are present.
- Enter csv, delimiter using the field table, then run the tool.
- Read cells. Interpret flags, units, ordering and placeholder values using the rules below.
- Review any reported issue or failed check, correct the supplied values when appropriate, and verify the result in its intended context.
| Input field | Meaning | Value type and bounds | Requirement |
|---|---|---|---|
| csv | CSV text | string; maximum text length 100000 | Required |
| delimiter | Delimiter | string; choose ",", ";", "\t" | Required |
Parse records and inspect every decoded cell, including any header. Return only cells containing line breaks with zero-based record/column positions and one-based line counts.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.
lineCount = count(CRLF or standalone CR/LF breaks)+1 This summarizes the declared operation. Units, indexing, inclusivity and exceptional cases are explained in the surrounding text.
| Output field | Meaning | Value type |
|---|---|---|
| cells | Cells | list of record: record (integer), column (integer), lineCount (integer) |
{
"input": {
"csv": "id,note\n1,\"a\r\nb\nc\"",
"delimiter": ","
},
"output": {
"cells": [
{
"record": 1,
"column": 1,
"lineCount": 3
}
]
}
} Limitations and assumptions
This does not count visual wrapped lines. Embedded ending characters remain part of the cell.
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 Quoted Multiline Safe Splitter for this operation: Split CSV into raw record fragments without outer record endings, preserving quote spelling, embedded line endings, blank records, and escaped quote pairs. For a complementary task, use Line Count vs Record Count Reconciler for this operation: Compare physical CSV line count with logical record count, treating CRLF as one break and a terminal ending as no extra line; embedded quoted breaks explain the excess physical lines.
Further background: Format and language reference: Multiline Quoted Cell Line Counter.
References
Similar or alternative tools
- Quoted Multiline Safe Splitter
Split CSV into raw record fragments without outer record endings, preserving quote spelling, embedded line endings, blank records, and escaped quote pairs.
- Line Count vs Record Count Reconciler
Compare physical CSV line count with logical record count, treating CRLF as one break and a terminal ending as no extra line; embedded quoted breaks explain the excess physical lines.