Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Test for open excel file
Message
De
30/09/2011 21:08:57
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01525312
Message ID:
01525319
Vues:
85
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform