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 ?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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.
回答2:
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
回答3:
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