[Home]  [Edit this page]  [Recent Changes]  [Special Pages]  [Help
ASPFAQ_Open_Excel_Application_Server_Side

How to open an MS Excel application on the server?

The example shows how to open an MS Office Excel application on the server. It can be useful when dealing with lots of documents in a proprietary format that the users want to view or edit but they may not have the specific application on their client machine.

<% @Language=VBScript%>
<% Option Explicit %>
<html>
<head><title>Open Excel on Server</title>
</head>
<body>
<%
  Dim appExcel
  Set appExcel = Server.CreateObject("Excel.Application")
  appExcel.Visible = True
  appExcel.Workbooks.Open(myExcel.xls)
%> 
</body>
</html>


We use the Server.CreateObject("Excel.Application") to create a new application object then we set its visibility property to true.

Workbooks.Open(myExcel.xls) displays the workbook of the Excel file name specified between the parentheses.

Related threads:


Back to ASP FAQ

last edited (May 5, 2004) by lillu, Number of views: 3980, Current Rev: 2 (Diff)

[Edit this page]  [Page history]  [What links here]  [Discuss this topic]  [Printer Friendly]  

Members

Username:

Password:


Register
Forgot Password?




Programmers Heaven - for .NET, Java, C/C++ and WEB Developers!
© 1996-2008 Community Networks Ltd. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Tore Nestenius at .NET Consultant - Synchron Data.