Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Better way to code Excel automation?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01313820
Message ID:
01314034
Vues:
21
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform