QueryInterface, with the object Excel.Application

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default QueryInterface, with the object Excel.Application

    Hello,

    With Asp.Net, I try to generat a document with an Excel object.

    This is the begin of my procedure:
    Dim xapExcel As Excel.Application
    xapExcel = New Excel.Application()
    xapExcel.Visible = False

    At the last line I obtain this error:
    "System.InvalidCastException: QueryInterface for interface
    Excel._Application failed."

    Other clues:
    - I have granted AspNet to run Excel (with the tool DComCnfg.exe).
    - I use Office XP in english, but the Os and .Net was in french. I have make
    some tests without succes by changing CurrentCulture.

    Someone have a solution ?

    Regards.



    Dominique MILLOT Guest

  2. Similar Questions and Discussions

    1. COM Object Excel
      Hi, I was using a Coldfusion 4.5 server on a windows NT platform on which I was exporting datas in a Excel 97 using COM object. I've migrated all...
    2. Excel.Application
      Hi I want to show a excel workbook trough my webserver using ASP. Wich dll's do I have to register in the webserver for this to work? Anyone...
    3. How to save a excel workbook in a web application
      I used the following code to create a workbook and save it in a webapplication. dim oExcel As Excel.ApplicationClass dim oBook As...
    4. Problem on the ASP using the Excel.Application Object
      Hi, All: I want to use excel component in the ASP. My code is that ----------------------------------------------------------- Dim oExcel As...
    5. Excel object in ASP
      I am trying to use an excel spreedsheet on an asp.net page. The follow code works (with output mod.) in a .net console application. When I try to...
  3. #2

    Default Re: QueryInterface, with the object Excel.Application

    Hi,
    Its better to use tlbimp when you use COM. here a detailed article of
    what you are looking for :
    [url]http://www.c-sharpcorner.com/Code/2002/Jan/CreateExcelSheetGAG.asp[/url]

    Natty Gur, CTO
    Dao2Com Ltd.
    28th Baruch Hirsch st. Bnei-Brak
    Israel , 51114

    Phone Numbers:
    Office: +972-(0)3-5786668
    Fax: +972-(0)3-5703475
    Mobile: +972-(0)58-888377

    Know the overall picture


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Natty Gur Guest

  4. #3

    Default Re: QueryInterface, with the object Excel.Application

    Thanks for your answer;

    tlbimp was certainly usefull for Excel 5, 2000.
    But I think we didn't need it for Office XP (2002)

    And in add, it was recommanded on every doc I find for C and not for VB.

    (Or I didn't understand tlbimp use)

    Regards.


    Dominique MILLOT Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139