CSVExporter๏
Inherits: RefCounted < Object
High-level CSV exporter with Variant stringification.
Description๏
CSVExporter converts arrays and dictionaries of Variants into delimiter-separated text. Values are stringified with engine Variant formatting where appropriate.
Methods๏
export(data: Array, file_path: String, delimiter: String = ",", color_as_hex: bool = false, hex_include_alpha: bool = false) static |
|
export_string(data: Array, delimiter: String = ",", color_as_hex: bool = false, hex_include_alpha: bool = false) static |
|
export_string_with_headers(data: Array, delimiter: String = ",", color_as_hex: bool = false, hex_include_alpha: bool = false) static |
|
export_with_headers(data: Array, file_path: String, delimiter: String = ",", color_as_hex: bool = false, hex_include_alpha: bool = false) static |
|
stringify(value: Variant, color_as_hex: bool = false, hex_include_alpha: bool = false) static |
Method Descriptions๏
bool export(data: Array, file_path: String, delimiter: String = ",", color_as_hex: bool = false, hex_include_alpha: bool = false) static ๐
Writes typed row arrays to a file.
String export_string(data: Array, delimiter: String = ",", color_as_hex: bool = false, hex_include_alpha: bool = false) static ๐
Converts typed row arrays to delimiter-separated text.
String export_string_with_headers(data: Array, delimiter: String = ",", color_as_hex: bool = false, hex_include_alpha: bool = false) static ๐
Converts dictionaries to delimiter-separated text, using dictionary keys as headers.
bool export_with_headers(data: Array, file_path: String, delimiter: String = ",", color_as_hex: bool = false, hex_include_alpha: bool = false) static ๐
Writes dictionaries to a file, using dictionary keys as headers.
String stringify(value: Variant, color_as_hex: bool = false, hex_include_alpha: bool = false) static ๐
Converts one Variant to a CSV field string.