type

CsvWriter

@Js
class CsvWriter : Obj

Write Haystack data in CSV format.

constructors

make

Wrap output stream

fields

delimiter

Delimiter character; defaults to comma.

newline

Newline string; defaults to "\n"

showHeader

Include the column names as a header row

stripUnits

Strip units from all numbers

methods

close

Close the underlying output stream

flush

Flush the underlying output stream and return this

writeGrid

Write grid as CSV and return this

Slot Details

close

Bool close()

Close the underlying output stream

delimiter

Int delimiter := 44

Delimiter character; defaults to comma.

flush

This flush()

Flush the underlying output stream and return this

make

new make(OutStream out, Dict? opts := null)

Wrap output stream

newline

Str newline := "\n"

Newline string; defaults to "\n"

showHeader

Bool showHeader := true

Include the column names as a header row

stripUnits

Bool stripUnits := false

Strip units from all numbers

writeGrid

virtual override This writeGrid(Grid grid)

Write grid as CSV and return this