PDA

Click to See Complete Forum and Search --> : Need Help Working with Microsoft Excel 2000 in ASP.NEt


ddolheguy
Sep 23rd, 2003, 03:15 AM
I am designing a reporting web site using ASP.NET and need to be able to pass the data from an SQL Query to Microsoft Excel. I don't want Excel to look as if it is a seperate application, but to use it within the page and talk to it using ASP.NET.

I am pretty sure I have seen web sites put Excel into their pages (provided it is on the client machine).

So far I can't even find the correct library to use to reference Excel. Any help people can give would be fantastic.

Fishcake
Sep 23rd, 2003, 04:02 AM
if you're using Visual Studio.net then under project drop down menu click on add reference... then on the COM tab, then if you scroll down you should find:
microsoft Excel 5.0 Object library
microsoft Excel 9.0 Object library

With a path to the library's somthing like C:\Program files\microsoft office\office\excel9.olb

ddolheguy
Sep 23rd, 2003, 07:51 PM
Fantastic, do yuo know where I can get some examples on how to use this COM object?

I also noticed that Microsoft offer a COM package called "OWC10", which looks really nice, but yet again documentation and examples are really hard to come by..

MartinSmith
Oct 2nd, 2003, 07:41 AM
You can use the Office Web components for this if you don't need any advanced features.

Possibly the easiest way is to make a dummy version of the kind of worksheet you want to generate and then choose the "Save as webpage" option and inspect the html code generated (it is essentially an HTML Encoded HTML table with a few style tags)

ddolheguy
Oct 2nd, 2003, 07:10 PM
Yes I realise this is the best way, but how??

I have looked at the OWC package and really need some doco on how to create a worksheet within a HTML or ASP.NET page.