简体   繁体   中英

After export data table to excel in C#, some cells' data messed up in excel

I am able to export the datatable to excel in C#, however, some of the cells filled up with string "##########################" instead of the corrected cell value. Anyone know why it happens and how to solve the problem?

i think those are datetime columns. you need to expand the column width to see the actual datetime value.

Check the following pictures:

before expanding the DateTime column width(it shows #########)
在此处输入图片说明

after expanding the DateTime column width(it shows actual datetime value)
在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM