Skip to main content

serializeTableToCSV

FitFileViewer - API Documentation v30.0.1


FitFileViewer - API Documentation / utils/files/export/copyTableAsCSV / serializeTableToCSV

Function: serializeTableToCSV()

serializeTableToCSV(table: unknown): string

Defined in: utils/files/export/copyTableAsCSV.ts:94

Serializes table-like row data to a CSV string without touching the clipboard.

IMPORTANT: Do not use Arquero's toCSV() here. Arquero's CSV implementation can rely on runtime function generation in some builds, which violates FitFileViewer's strict CSP (unsafe-eval is not allowed).

Parameters​

table​

unknown

Table-like rows to serialize.

Returns​

string

CSV text suitable for clipboard or file export.

Throws​

When the input table cannot be normalized.