Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excel opening problem
Message
De
13/07/2001 10:46:12
 
 
À
13/07/2001 09:12:29
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00530183
Message ID:
00530251
Vues:
16
>I want to open an Excel sheet from an ASP page using the instruction
>
>XL = CreateObject("Excel.Sheet")
>
>But when i run It, my server display the following error message:
>
>Call rejected by callee.
>
>What's the problem? Is this because the Web Server I'm using is PWS? Does IT exists an alternate solution to open an Excel Sheet?
>
>Thanks!

Are you trying to open it so the user can see it as an Excel sheet in the browser?
If so, your code will not work. That call on as ASP page is trying to open the sheet on the server, not the client. You can simply redirect the browser to the Excel file that resides on the server, and if the user has Excel installed, it will open inside IE. If not, it will prompt the user to download it. You cannot open a file in the user's machine, unless you're using an ActiveX Control, Java Applet or some other code that gets downloaded to the client.

Or are you trying to open it on the server to access the data in the sheet in your server code?
In this case, you have to make sure Excel is installed on the server, and I believe (I am not 100% on this without checking) that you have to first instantiate Excel.Application to be able to access the rest of the objects. Regardless, you can also use ADO to read data from an Excel spreadsheet, which is more efficient and scalable than using Excel automation. Check out these Microsoft Knowledge Base articles: Q195951, Q247412 and Q278973 (there's others, too, but these give you a good idea).

hope this helps.
Andres M. Chiriboga, MCSE, MCP+I
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform