Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLE with Excel
Message
From
23/07/2002 11:28:47
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
23/07/2002 11:10:22
Mike Smith
Doncaster Office Services
Oakville, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00681685
Message ID:
00681701
Views:
14
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform