<P class=MsoNormal>One of the common terms used in the OfficeWriter product is the keyword, “template.” An OfficeWriter template is an .xls file that contains data markers or a .doc file that contains merge fields. A data marker or merge field specifies a database column, variable, or array to insert in the spreadsheet or document containing the marker or field. OfficeWriter templates are created in Microsoft Office and bound to data sources in code. When you run the code, OfficeWriter populates the template with values from one or more data sources. Look at the following example.</P> <P class=MsoNormal><IMG alt="" hspace=0 src="http://authors.aspalliance.com/das/images/fig1.jpg" align=baseline border=0></P> <P class=CodeListingHeading>Figure 1: An Excel Template</P> <P class=MsoNormal>In the above example, three data columns have been marked in columns A, B, and C, respectively. This will tell the ExcelWriter to populate the Author Id value in Column A, the Author Firstname in Column B, and the Author Last Name in column C.</P> |