Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selected Range
Message
 
To
21/12/1999 23:36:54
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Miscellaneous
Thread ID:
00306941
Message ID:
00307218
Views:
24
Cetin,

>OK :) Wellcome to "hair pullers club" :)

There wasn't much of it with Excel. Bloatus Fart...er...Lotus SmartSuite 97 practically took all I had< g >.

>As John said recording a macro is a good way of "stealing" how to. It's not as straight forward all the time but 99% works. Just be carefull what an object "applies too". For a quick starter :
>Range("B5:Z10")
>Range("B5:G10,A6:Z7,1:1,M:M")
>are valid ranges :) Try this :
>
ox=createobject("Excel.Application")
>with ox
> .Workbooks.Add
> with .ActiveWorkBook.ActiveSheet
>   .Range("B5:G10,A6:Z7,1:1,M:M").Select
> endwith
> .Visible = .t.
>endwith
If you plan cells carefully you can "sign" with selection :)

I think that the problem here precludes my "stealing". Here's the deal.

I wrote a program back in FPW 2.6 (that's still in use, BTW) that produces cost estimates for Shaw. Theres a ton of supporting data, all of it in spreadsheets. There are 5 plants involved, each with processes and supporting data for those processes. Some of these processes are the same, some are different. Therefore the spreadsheets are different from plant to plant. Now, the data that's imported is sometimes in cross tables, sometimes not. Further, the number and size of the cross tables (or not < g >) varies from location to location.

In FPW, I relied on the DDE interface with 1-2-3 to retrieve this data. What the user did was select the file, the application would, if necessary start 1-2-3 and open it. The user could then click a button, maximize 1-2-3, and highlight a range. When they minimized it and went back to my application, then could then click a button and the data was pulled into the appropriate table. Since the layout, location, size, etc. could not be standardized, this method seemed to be the best approach.

Of course, when the DDE interface was removed from 1-2-3, it meant that we'd have to keep using Release 5 (the last that supported it). Since I'm in the process of re-doing this stuff in VFP, I naturally went for the OLE server route. However, after spending nearly a day in trying to figure out their implementation, and since the possibility exists that we may change to MS Office, I decided to try the same thing in Office. The fact that I've succeeded (with your assistance) in a fraction of the time, will be helpful in presenting an argument as to why we should switch.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform