Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 17th, 2004, 08:24 PM
Registered User
 
Join Date: Jun 2003
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Open & Close Excel file in the background

Hi, I tried ASP to open and close an Excel file in the background, allowing a macro to perform some actions:

         Set objXL = Server.CreateObject("Excel.Application")
         objXL.Visible = False
         objXL.DisplayAlerts = False
         Set objWkb = objXL.Workbooks.Open("C:\test.xls")
         objWkb.Close , True
         Set objWkb = Nothing
         Set objXL = Nothing
But this didn't work, the test file was locked. Any wrong with the code? Thanks in advance.

Mike




Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel error cant open file Born2BFree Excel VBA 1 February 20th, 2007 01:05 PM
Open an Excel file using Access, pls help! sunny76 Access VBA 9 June 29th, 2005 02:14 AM
How to open Excel File in Access losartan Access 1 January 24th, 2005 06:08 PM
open excel file C# ? npqk VS.NET 2002/2003 2 November 26th, 2004 10:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.