Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
EXCEL Office Automation-file won't close
Message
From
10/10/2009 17:23:24
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01428674
Message ID:
01428686
Views:
53
>I am getting an OLE sharing violation error, although my EXCEL file is closed as demonstrated by the code below. The OLE Error occurs when using the APPEND FROM command in the bottom portion of the code. The specific error states: "OLE error code 0x80030020: A share violation has occurred."
>
>Is there some possibility that the oExcel.Quit command doesn't close the EXCEL file?

Maybe not immediately? Excel, just like any other sufficiently complicated app, creates temp files, creates a lock file etc - and has to clean up on exit. Perhaps it closes the sheet itself last, and the .quit() returns .t. immediately - while in the background the actual shutdown may take some time.

You may try some delay, perhaps. Or check whether fopen() of the .xls file triggers any errors, in a timed loop.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform