pub struct CsvOptions {
pub delimiter: char,
pub line_ending: LineEnding,
pub header: bool,
pub values: CsvValues,
pub bom: bool,
pub guard_formulas: bool,
}Expand description
How to_csv writes.
Fields§
§delimiter: charWhat separates the fields: a comma, or a semicolon for the spreadsheets of a locale that writes its decimal comma.
line_ending: LineEndingHow a line ends.
header: boolWhether the first line names the columns.
values: CsvValuesWhether the cells carry the values or the text shown.
bom: boolWhether to start the file with a byte order mark. Excel reads a file without one as the system’s code page and mangles every umlaut; most other readers accept it silently.
guard_formulas: boolWhether to defuse text that a spreadsheet would run as a formula.
A cell that starts with =, +, -, @, a tab or a carriage return is
a formula to Excel, and a grid shows what its users typed. Such text gets
a ' in front, which the spreadsheet shows as nothing. Numbers are not
touched: -5 stays -5. Turn it off only for a file that no
spreadsheet will open.