Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Better way to code Excel automation?
Message
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:
01314034
Views:
20
Hi Albert,

>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.

BTW, the same is possible in Excel. You can give a cell a name. Other sheets in the document can then refer to the cell by the name instead of "Sheet!A1" or something like this. That's useful if you just have simple values and no one to many relation (like invoice items).

With XML or automation create a sheet that has all values in column A, one value each row. Then assign each cell a name. In column B you might have an explanation for each value for reference purposes.

Your template should have a similar structured sheet in the workbook with sample data in there. All other sheets refer to named cells. This way you customer can continue to keep editing the template document. To generate the final document, all you need to do is to create a copy of the template and swap the sheet with sample values in exchange for the generated sheet with real values. That should be an easy task in automation or by using XML. All other sheets can remain unchanged.
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform