How Do I Create a Dynamic Excel Document? (Magic xpa 4.x)
-
Create a document in Excel that looks about like what you want.
-
Where you want your tags, add some special string, such as qqqMG_Custxx. Do not use the <!$MG_Cust> format, because the special characters will be converted by Word in the next step.
-
Save the document as HTML, then close it in Excel.
-
Edit the HTML with a text editor. Replace your special tags, such as qqqMG_SNxxx, with the Magic xpa tags, such as <!$MG_ SN>. Add your MGREPEATs and MGIFs as needed.
Hint: If you use a unique string, like qqq, you can let the Find/Replace command do most of the work.
-
Use this HTML file as your Merge template.
-
For your output file name, use the XLS extension.
Now, when the document is created, it will open in Excel and look like a Excel document.
The Online and Rich Client Samples projects (program MG05 and RMG05)