Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Driving Excel
Message
De
14/11/2001 12:31:42
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Driving Excel
Divers
Thread ID:
00581635
Message ID:
00581635
Vues:
54
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
Fil
Voir

Click here to load this message in the networking platform