Export to Excel using ASP

2019-06-01 01:47发布

At the time of exporting to excel using ASP. After converting a column in text format single quote is visible in the excel file. how to hide this automatically ?

3条回答
Evening l夕情丶
2楼-- · 2019-06-01 01:55

You might be helped by setting the style of your cell to mso-number-format:"\@", but I'd have to see your code to know the exact problem.

I think you might find Styling Excel cells with mso-number-format and Generate Excel files in ASP Classic useful.

查看更多
Root(大扎)
3楼-- · 2019-06-01 02:18

When you export to excel, you could juste make a table with cell, and put your value into double quote. Excel will read it correctly

查看更多
Luminary・发光体
4楼-- · 2019-06-01 02:18

Here's the library I use, to export data to Excel 2007 (.xlsx) files.

It lets you export any DataSet, DataTable or List<> directly into an Excel 2007 file, using one line of code.

It's completely free, and you can download the source code (and see how to use it) here: http://www.mikesknowledgebase.com/pages/CSharp/ExportToExcel.htm

查看更多
登录 后发表回答