CSVWriter
Inherits: RefCounted < Object
Streaming CSV writer with Variant stringification.
Description
CSVWriter wraps DSVWriter and converts Variants with CSVExporter.stringify() while writing rows incrementally.
Properties
|
||
|
||
|
||
|
Methods
void |
close() |
get_error() const |
|
open(file_path: String, delimiter: String = ",", append: bool = false) |
|
write_rows(rows: Array) |
Property Descriptions
If true, Color values are written as HTML color strings.
PackedStringArray header_names = PackedStringArray() 🔗
void set_header_names(value: PackedStringArray)
PackedStringArray get_header_names()
Header names and dictionary output order used when headers is enabled.
Note: The returned array is copied and any changes to it will not update the original property value. See PackedStringArray for more details.
If true, writes one header row before the first data row.
bool hex_include_alpha = false 🔗
If true, HTML color strings include alpha when color_as_hex is enabled.
Method Descriptions
void close() 🔗
Closes the current output file.
Returns the last error from the underlying DSVWriter.
Error open(file_path: String, delimiter: String = ",", append: bool = false) 🔗
Opens file_path for streaming writes. If append is true, rows are appended to an existing file when possible.
bool write_row(row: Variant) 🔗
Writes one row. If headers is enabled and row is a Dictionary, header_names controls the output field order.
bool write_rows(rows: Array) 🔗
Writes each row in rows.