SpreadsheetCsv.h header

#include <ew/app/SpreadsheetCsv.h>

Namespace ew::app

Functions

ew::core::SpreadsheetGrid ew::app::parseDelimitedText(const QString &text, QChar separator=QChar(','))

Parses CSV (or, with separator '\t', TSV) text into a grid of literal cells: one cell per non-empty field, with the dimensions covering the parsed rows and columns. Quoted fields (with doubled inner quotes) and CRLF or LF line endings are handled.

QString ew::app::spreadsheetToCsv(const ew::core::Spreadsheet &sheet, QChar separator=QChar(','))

Serializes sheet to delimited text (RFC 4180 CSV with the default separator ',', or TSV with '\t') using each cell's evaluated (displayed) value, so the export carries computed results. The output is trimmed to the used rectangle; fields containing the separator, a quote, or a newline are quoted with doubled inner quotes. An empty sheet yields an empty string.