Results 1 to 5 of 5

Thread: Need Help Working with Microsoft Excel 2000 in ASP.NEt

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2003
    Posts
    16

    Question Need Help Working with Microsoft Excel 2000 in ASP.NEt

    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.

  2. #2
    Frenzied Member Fishcake's Avatar
    Join Date
    Feb 2001
    Location
    Derby, UK
    Posts
    1,092
    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

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Sep 2003
    Posts
    16
    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..

  4. #4
    Fanatic Member
    Join Date
    Jul 2001
    Location
    London UK
    Posts
    671
    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)

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Sep 2003
    Posts
    16
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width