Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Driving Excel
Message
From
14/11/2001 21:33:26
Wilfred Chan
Bnp Paribas Hong Kong Branch
Hong Kong, Hong Kong
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00581635
Message ID:
00581878
Views:
17
Hi,

Did you open the Excel file with oBook=oExcel.workbooks.open('...xls') ?
If yes, did you close it with oBook.close ? Since it must be done.

Can you give more details about what is going on after loading the file,
during closing the forms, etc... ? Because I've tried many way to open 2 xls in VFP & Excel and no problems was found.

Wilfred

>
Hi Folks,
>
>I've a slight problem with Excel. In my application, I'm generating a number of Excel files & these are embedded in a SQL Server table & general field.
>
>To view these files, I create an instance of Excel using
>
>oExcel = CreateObject("Excel.Application")
>
>& I'm able to load the required file. However, the problem arises when I close my form that drives all this.
>
>If the user elects to keep the Excel file on disk, they're unable to open it by double clicking it using Explorer. The Excel window, menu & toolbar appears, but that's it. However, if Excel is loaded 1st, then the file opened by the File\Open dialog, it's ok.
>
>The only way to view the files via Explorer is to close my FoxPro application.
>
>It seems to be that if the user attempts to open an Excel file with the same name via Explorer that's been opened by my FoxPro application. The files are seperate copies, just with the same name. I'm aware that Excel won't allow 2 files with the same name to be opened at the same time, an error appears.
>
>I'm destroying closing the Excel files & destroying the Excel objects before destroying the form object itself.
>
>My own feeling is that the "2 files with the same name error" isn't working correctly in this scenario.
>
>Any thoughts?
>
>Many thanks,
>
> Andy Crawshaw
Previous
Reply
Map
View

Click here to load this message in the networking platform