Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Better way to code Excel automation?
Message
From
29/04/2008 11:00:20
 
 
To
29/04/2008 10:29:54
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01313820
Message ID:
01313855
Views:
21
>Hi all,
>
>Is there a more maintainable way to code VFP automation of Excel other than "dead reckoning" of cells e.g.
>
>oExcel.ActiveWookBook.ActiveSheet.Range("B5").Value = 100
>
>My client has given me a very complex template to push data across to - I can see coding in hundreds of lines and then them adding a new row half way down the sheet and I have to then go in and increment every cell reference by 1 row.
>
>In Word, I used bookmarks to "tag" a spot in the document and so as long as the bookmark exists, I can find it and insert text. Users can therefore continue to add or change text as long as they leave the bookmarks in.
>
>Does Excel have the ability to "tag" a cell with a name (within the template) so that I can find the cell by name and update it's data?
>

Hi Albert

Have look at download#14800
It i excel automation wrapper class. I have done quiet a bit of filling up complex templates with it.

As for tags;

What I used to do is create invisible/non printable column and then store my own tags to determine content to be written. Then I would read that column
in a loop and write accordingly.

HTH

Sergio
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Reply
Map
View

Click here to load this message in the networking platform