NetCharts Server .NET Toolkit

DataConversion.convertDataTableToCSV Method (DataTable, Boolean)

Converts a DataTable to a CSV (Comma-Separated-Value) delimited set.

public static string convertDataTableToCSV(
   DataTable dt,
   bool includeColumnNames
);

Parameters

dt
The DataTable to convert to a CSV (Comma-Separated-Value) delimited set.
includeColumnNames
Whether or not to include the DataTable column names as the first row of the CSV (Comma-Separated-Value) delimited set.

Return Value

CSV (Comma-Separated-Value) populated from the DataTable.

Exceptions

Exception TypeCondition
NSToolKitExceptionThrown when the DataTable is
null
or
Nothing
.

See Also

DataConversion Class | NetChartsServer Namespace | DataConversion.convertDataTableToCSV Overload List