Last post Feb 20, 2010 03:51 AM by TATWORTH
Feb 16, 2010 08:55 PM|hans_v|LINK
Many times, people ask how to create Excel file in ASP.NET. Most of the times, people use Microsoft.Office.Interop.Excel, which is not supported nor recommended by Microsoft. There are some third party controls on the market, but I never found an Open Source
component that could do the job, untill today. In
another thread someone pointed to an Codeplex project, and to my surprise, it really seems to work quit well, so I think I should post this here, because this is one of the most common questions in this forum.
So if you want to create Excel files in ASP.NET, check this out:
Feb 17, 2010 01:07 AM|vijay_010237866|LINK
u can use respone object for that
and set various properties
and then do response.Write(StreamWriter ) ; to get the excel
Feb 17, 2010 07:30 AM|hans_v|LINK
Just by changing the contenttype you won't get a real excel file, you just telling that the html table should be opened with excel. When you open this file in excel, you'll get the warnig that the file is not in the rght format, but yes, it will open the
file and you can see the table. But you cannot create multiple sheets, set all kinds of properties, etc... and create a real excel file which this component can do.
Feb 20, 2010 03:51 AM|TATWORTH|LINK
Thank you for the link to http://npoi.codeplex.com/
According to the CodePlex entry, it can also work on word and power point files.