Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP6 and Excel
Message
De
18/11/2003 04:52:45
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Divers
Thread ID:
00806542
Message ID:
00850897
Vues:
28
>Cetin
>
>I can't seem to close the excel file using the following code
>
>The start of the program
>
>With thisform.OleControl1
> .Navigate2('file://c:\global\clientstats.xls')
> Do While .ReadyState # 4 && Wait for ready state
> EndDo
>endwith
>
>rest of program
>
>oExcel.Application.ActiveWorkbook.Save()
>With thisform.OleControl1
> .Navigate2('file://c:\global\global.htm')
> Do While .ReadyState # 4 && Wait for ready state
> EndDo
>endwith
>
>Followed by attempt to email clientstats.xls which it can't because the emailer says flie accessed denied
>
>Any ideas?
>
>Thanks
>
>Colin

Colin,
First try (not sure) releasing oExcel.

Generally what I do is to fire up a timer object which tries to gain RW access to xls file. When it does excel released it and I can do whatever like erasing.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform