Export to Excel using ASP

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 ?

Upvotes: 1

Views: 2492

Answers (3)

Mike Gledhill
Mike Gledhill

Reputation: 29161

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

Upvotes: 0

C&#233;dric Boivin
C&#233;dric Boivin

Reputation: 11341

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

Upvotes: 1

Kristof Neirynck
Kristof Neirynck

Reputation: 4162

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.

Upvotes: 1

Related Questions