Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OLE with Excel
Message
De
23/07/2002 11:28:47
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
23/07/2002 11:10:22
Mike Smith
Doncaster Office Services
Oakville, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00681685
Message ID:
00681701
Vues:
13
>I know Tamar Ganor has written a book on this and I will be ordering it when I get back to my office. Currently I am out of town and all I have is the VFP Help System.
>
>I am developing an application that uses OLE to send out VFP data to a MS Excel Spreadsheet.
>
>I have it working quite well and I am really heppy with it but I am having a problem with the file management.
>
>i.e. To get a clean and proper copy of the spread sheet I start with the line of code below:
>
>COPY FILE PM1.XLS TO POSTEDMARKS1.XLS && THIS CLEARS OUT THE OLD COPY
>
>Then I start the transfer code:
>
>OLEAPP = CREATEOBJECT("Excel.Application")
>
>My problem is if the operator has the file POSTEDMARKS1.XLS open in MS Excel, then the COPY FILE code fails.
>
>I am trying to find a way of determining if the POSTEDMARKS1.XLS is already open and if it is, I would bypass the COPY FILE code.
>
>If someone can help me with this it would be great.
>
>Mike Smith
handle = fopen('postedmarks1.xls',12)
if handle>0
 =fclose(handle)
 copy file ...
else
 *in use
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