Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Open an existing Excel file
Message
 
À
13/05/2005 11:39:55
Justin Roper
The Cadle Company
Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Novell 6.x
Database:
Visual FoxPro
Divers
Thread ID:
01013850
Message ID:
01013934
Vues:
11
You could check the status of the activeworkbook after opening:

?oExcel.ActiveWorkbook.Readonly

or before opening:

?oExcel.Workbooks.CanCheckout(fullpath(file_name))


Though I do not know how to get the user name by whom the file is locked.


>Not sure what you mean. I am using the following code..
>
>oExcel = CREATEOBJECT("Excel.Application")
>oExcel.Visible = .T.
>oBook = oExcel.Workbooks.FOPEN(xlFile)
>oSheet = oBook.ActiveSheet
>
>and it will allow me to open it and write to it even though it is ReadOnly. I want to prevent this from opening until someone else is done using it.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform