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๏ƒ

bool

export(data: Array, file_path: String, delimiter: String = ",", color_as_hex: bool = false, hex_include_alpha: bool = false) static

String

export_string(data: Array, delimiter: String = ",", color_as_hex: bool = false, hex_include_alpha: bool = false) static

String

export_string_with_headers(data: Array, delimiter: String = ",", color_as_hex: bool = false, hex_include_alpha: bool = false) static

bool

export_with_headers(data: Array, file_path: String, delimiter: String = ",", color_as_hex: bool = false, hex_include_alpha: bool = false) static

String

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.