i can generate an excel doc from console apps using C#
and by using the following :
using Microsoft.Office.Interop.Excel;
using System.Reflection;
using System.Runtime.InteropServices;
How do i create Excel Doc on the fly from web apps?
As Patrick has said, don't even consider using server-side Office
automation - Microsoft don't support it because it doesn't work...
Fortunately, creating Excel documents from ASP.NET (which I assume is what
you're using) is fairly simple:
1) Use HTML
Create an HTML document and give it a .xls extention - Excel will treat it
like a native Excel document. This is very simple and (obviously) free, but
you are limited to a single worksheet.
2) Use OpenXML
http://www.microsoft.com/downloads/...52-3547-420a-a412-00a2662442d9&displaylang=en
http://www.microsoft.com/downloads/...80-f2c0-4b80-9ad1-2cb0c300aef9&displaylang=en
Again, this is free, but is not for the faint-hearted... However, it will
allow you to create multi-sheet workbooks
3) Use Aspose
http://www.aspose.com/Products/Aspose.Cells/Default.aspx
This is by far the simplest solution, but it's a commercial product...