Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Open an existing Excel file
Message
 
To
13/05/2005 11:39:55
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Novell 6.x
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01013850
Message ID:
01013934
Views:
10
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform