IT world observations

Just sharing my knowledge about the internet, programming, etc.

Tuesday, September 13, 2005

Creating EXCEL files with ASP

There are four main ways to generate excel files with asp.

First one is so called MIME document change – you simply generate html table and change Response.ContentType property to application/vnd.ms-excel. This way is good for simple documents and lets you to save one license (because you don’t need excel on web server). Although you can not create document with several sheets, use formulas, etc.

Second one is to use Excel.Application object (CreateObject("Excel.Application")), which uses Office Automation to create an Excel spreadsheet that you can manipulate through your ASP page. It gives you full access to the many features of Excel, but it’s slow
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_wrcore/html/wrgrfexcelapplicationobject.asp

Third way is to use OWC (Office Web Components) - a collection of web components included in Microsoft Office 2000, XP and 2003. They can be plugged into web pages and Visual Basic forms.
http://support.microsoft.com/default.aspx?scid=kb;en-us;288130
http://www.4guysfromrolla.com/webtech/051502-1.shtml
http://www.4guysfromrolla.com/webtech/022801-1.shtml

And fourth way is to use ADO to generate Excel files.
http://dypso.free.fr/tech/generer_excel_avec_ado.php

More one can read here:
http://www.hotscripts.com/ASP/Tips_and_Tutorials/Excel_and_ASP/

0 Comments:

Post a Comment

<< Home