Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Does Foxpro know if an Excel workbook is being modified?
Message
 
 
À
20/11/2000 09:50:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00443610
Message ID:
00443650
Vues:
9
>I've used the following code to open up an excel workbook.
>
>oleapp = createobject('excel.application')
>oleapp.visible = .t.
>olewbook = oleapp.workbooks
>olewbook.open('p:\test.xls')
>
>If the workbook is already opened up by someone else prior to running the above code and error is generated when the line "olewbook.open('p:\test.xls')" is executed. Foxpro can't open up the file for read/write because someone else has it opened. How can I test if the excel workbook is opened by someone else before running this code?

Perhaps, you can try with low-level function lnHandle=fopen('yourfile',12) and fclose(lnHandle)

Check Help on these functions.

HTH
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform