Datatable To File

Writes the DataTable object to an Excel file.


⬅️INPUT

Parameter

Type

Required

Description

Data

DataTable

✅ Yes

DataTable data to write

FilePath

String

❌ No

Excel file path

FileData

Byte[]

❌ No

Existing Excel binary data

SheetName

String

❌ No

Target sheet name

ColumnNames

String

❌ No

Column names

StartRow

Int32?

❌ No

Start row number

StartColumn

Int32?

❌ No

Start column number

AppendIfExists

Boolean

❌ No

Whether to append if the file exists


➡️OUTPUT

Parameter

Type

Description

IsDataTableToExcelFileSuccessful

Boolean

Whether the operation succeeded

DataTableToExcelFileMessage

String

Result message

DataTabletoExcelFileResult

Byte[]

Created Excel file


⬇️MISC

Parameter

Type

Default

Description

ThrowException

Boolean

❌No

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