Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does Foxpro know if an Excel workbook is being modified?
Message
 
 
To
20/11/2000 09:50:08
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00443610
Message ID:
00443650
Views:
13
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform