Hello,
When I export a datatable that has Null values in it, this is exported as values: NULL instead of an empty value.
Has can we fix this?
Thank you
DataTable table = new DataTable();
table.Columns.Add("Column1");
table.Columns.Add("Column2");
table.Columns.Add("Column3");
table.Rows.Add("Value row1 column1", "Value row1 column2", "Value row1 column3");
table.Rows.Add("Value row2 column1", DBNull.Value, "Value row2 column3");
TXTExport txtExport = new TXTExport();
txtExport.ExportType = TextExportType.CSV;
txtExport.DataTable = table;
txtExport.DataSource = ExportSource.DataTable;
txtExport.SaveToFile("TestWithNullValue.csv");
"Column1";"Column2";"Column3"
"Value row1 column1";"Value row1 column2";"Value row1 column3"
"Value row2 column1";"null";"Value row2 column3"
"Column1";"Column2";"Column3"
"Value row1 column1";"Value row1 column2";"Value row1 column3"
"Value row2 column1";;"Value row2 column3"
"Value row2 column1";;"Value row2 column3";
table.Rows.Add("Value row2 column1", DBNull.Value.ToString(), "Value row2 column3");