Skip to content

Interface: DownloadCsvOptions<T>

Defined in: platform/browser.ts:10

Options for downloadCsv: every encoder option plus file metadata.

Extends

Type Parameters

Type ParameterDefault type
T extends objectCsvRecord

Properties

arraySeparator?

ts
optional arraySeparator?: string;

Defined in: types.ts:95

Separator used to join an array within a single cell. Default ", ".

Inherited from

CsvOptions.arraySeparator


bom?

ts
optional bom?: boolean;

Defined in: types.ts:97

Prepend a UTF-8 byte-order mark. Default false.

Inherited from

CsvOptions.bom


booleans?

ts
optional booleans?: BooleanStyle;

Defined in: types.ts:93

Rendering of boolean values. Default { true: "true", false: "false" }.

Inherited from

CsvOptions.booleans


columns?

ts
optional columns?: CsvColumns<T>;

Defined in: types.ts:118

Columns to emit. When omitted, the columns are the stable union of every record's keys, in first-seen order.

Inherited from

CsvOptions.columns


filename?

ts
optional filename?: string;

Defined in: platform/browser.ts:14

Suggested file name for the download. Default "data.csv".


finalNewline?

ts
optional finalNewline?: boolean;

Defined in: types.ts:79

Append a trailing newline after the last record. Default false.

Inherited from

CsvOptions.finalNewline


format?

ts
optional format?: CsvFormatter;

Defined in: types.ts:83

Transform each raw value into a cell before it is encoded.

Inherited from

CsvOptions.format


formulaPrefix?

ts
optional formulaPrefix?: string;

Defined in: types.ts:107

Prefix applied by sanitizeFormulas. Default ' (a single quote).

Inherited from

CsvOptions.formulaPrefix


infinityText?

ts
optional infinityText?: string;

Defined in: types.ts:91

Text for Infinity. -Infinity is rendered as - followed by this. Default Infinity.

Inherited from

CsvOptions.infinityText


mimeType?

ts
optional mimeType?: string;

Defined in: platform/browser.ts:16

Blob MIME type. Default "text/csv;charset=utf-8".


nanText?

ts
optional nanText?: string;

Defined in: types.ts:89

Text for NaN values. Default "".

Inherited from

CsvOptions.nanText


newline?

ts
optional newline?: string;

Defined in: types.ts:77

Line terminator between records. Default \r\n (RFC 4180).

Inherited from

CsvOptions.newline


nullText?

ts
optional nullText?: string;

Defined in: types.ts:85

Text for null values. Default "".

Inherited from

CsvOptions.nullText


quote?

ts
optional quote?: string;

Defined in: types.ts:75

Quote character used when a field must be quoted. Default ".

Inherited from

CsvOptions.quote


quoting?

ts
optional quoting?: QuotingMode;

Defined in: types.ts:81

Quoting strategy. Default minimal.

Inherited from

CsvOptions.quoting


sanitizeFormulas?

ts
optional sanitizeFormulas?: boolean;

Defined in: types.ts:105

Guard against CSV formula injection. When a string or array cell would begin with a character a spreadsheet may treat as a formula (=, +, -, @, a tab, or a carriage return), prefix it with formulaPrefix so the value is shown literally. Numbers, booleans, and dates are never altered. Default false.

Inherited from

CsvOptions.sanitizeFormulas


separator?

ts
optional separator?: string;

Defined in: types.ts:73

Field separator. Default ,.

Inherited from

CsvOptions.separator


showHeaders?

ts
optional showHeaders?: boolean;

Defined in: types.ts:71

Whether to emit a header row. Default true.

Inherited from

CsvOptions.showHeaders


undefinedText?

ts
optional undefinedText?: string;

Defined in: types.ts:87

Text for undefined values. Default "".

Inherited from

CsvOptions.undefinedText

Released under the MIT License.