Hello,
Thanks for your inquiry!
I simulated a data table and tested your code with the latest
Spire.Xls V11.3.4 but did not reproduce your issue.
If you were not using the latest version, I recommend that you have a try.
If the issue still exists, I guess the issue may be caused by the length of the data in your data table. To help us reproduce your issue, please provide us with the data of your data table (you can export them to a txt file refer to the following code), your system information (E.g. Win7, 64 bit) and region setting (E.g. China, Chinese) for reference.
Thanks in advance.
- Code: Select all
StringBuilder builder = new StringBuilder();
foreach(DataColumn column in dt.Columns)
{
builder.Append(column.ColumnName + "\t");
}
foreach(DataRow row in dt.Rows)
{
builder.Append("\r\n");
for (int i =0; i < dt.Columns.Count; i++)
{
builder.Append(row[i].ToString()+"\t");
}
}
File.WriteAllText("datatable.txt", builder.ToString());
Sincerely,
Marcia
E-iceblue support team