Create Excel file using asp.net

  • Thread starter Thread starter Rahul
  • Start date Start date
R

Rahul

I want to create an excel file for report in asp.net 2.0 ...
without having office installed on the server.

Rahul
 
The fastest way is to create a html file containing a table and renaming it
to .xls
We use this for large files. The html is created using a webcontrol which
we've written on which we call the render function using a htmltextwriter
that wraps a stringwriter.

If you want more of the excel functionallity you'd have to get some excel
output component.

hope this helps!
/mortb
 
I want to create an excel file for report in asp.net 2.0 ...

No problem.
without having office installed on the server.

Hurrah! Glad to hear it!

Basically, you have three choices:

1) HTML
Create an HTML document and save it with a .xls extension - Excel will open
it and treat it like a native Excel file. This method is very simple and, of
course, free - however, it won't allow you to have more than one worksheet
in the Excel workbook...

2) Use the (relatively) new XML file format
http://www.microsoft.com/downloads/...52-3547-420a-a412-00a2662442d9&displaylang=en
http://www.microsoft.com/downloads/...80-f2c0-4b80-9ad1-2cb0c300aef9&displaylang=en
This is also free, and incredibly powerful, but not for the faint-hearted...

3) Use Aspose
http://www.aspose.com/Products/Aspose.Cells/Default.aspx
This is not free, but is extremely simple to use.
 
You could open an existing Excel file and modify it as an ADO.NET data
source:
http://groups.google.com/group/micr...14d90e974e5/571439ff12d7473d#571439ff12d7473d

Or here are some other ways to create Excel output:
http://SteveOrr.net/articles/ExcelExport.aspx

Here's a free control that can help with Excel output (and Word, PowerPoint,
and WordPerfect output):
http://SteveOrr.net/articles/ExportPanel.aspx

And here are a couple good 3rd party products that can make your chores
easy:
http://SteveOrr.net/reviews/AsposeExcel.aspx
http://SteveOrr.net/reviews/OfficeWriter.aspx
 
Back
Top