Datatable To File

Converts a DataTable object to a CSV file.


⬅️INPUT

Parameter

Type

Required

Description

Data

DataTable

✅ Yes

DataTable to export

Separator

String

✅ Yes

CSV separator character

FilePath

String

❌ No

Target file path

ColumnNames

String

❌ No

Names of the columns to export


➡️OUTPUT

Parameter

Type

Description

IsDataTableToCsvFileSuccessful

Boolean

Whether the operation succeeded

DataTableToCsvFileMessage

String

Status/error message

DataTableToFileResult

Byte[]

Binary content of the CSV file


⬇️MISC

Parameter

Type

Default

Description

ThrowException

Boolean

❌No

Specifies whether an exception is thrown when the operation fails. The default value is "No".