Information générale
Catégorie:
Codage, syntaxe et commandes
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement