Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Test for open excel file
Message
From
30/09/2011 21:08:57
 
 
To
30/09/2011 20:41:50
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01525312
Message ID:
01525319
Views:
87
This message has been marked as the solution to the initial question of the thread.
If I understandyou your question correctly, you want to create a new file, to replace the old one. So if you try to delete the old file in a TRY - CATCH- ENDTRY block, you will be able to see whether you can delete the old file or not. If you can, you can go on, if not create a warning message.

>would i not end up with the same error message tore?
>k
>>Try to delete the old file before creating the new file. If you can't delete the file, then it must be in use.
>>
>>>When i try and create an excel file programmatically AND a copy of the file is already open i get this message
>>>Cannot create file c:\mydir\myexcel.xls
>>>is there a way to test if file is open before trying to create it offering operator a warning to close existing file.
>>>thanks
>>>k
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform