Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

1. Create a new .XLSX file. Save it as template.xlsx.

Info

In the Hello World sample codeweb application, the completed template file is located in in \templates\Hello World.xlsx.

...

All ExcelWriter data markers are prefaced with '%%=' and the additional '$' sign means that the data source for this data marker is 1-dimensional (e.g. 1-dimensional array or single value). 'DataValue' is the data marker ID we'll use to bind the data to this data marker.

...

Below is a screenshot of the completed template file from the Hello World sample:

3. Now the template file is done. Next is writing the code to bind the string value to the data marker.

...

Info

In the sample code, the completed file is: ExcelTemplate_HelloWorld.aspx.[cs/vb]. The corresponding web form is ExcelTemplate_HelloWorld.aspx.

1. Make a new file named ExcelTemplate_HelloWorld.cs. Include the SoftArtisans.OfficeWriter.ExcelWriter namespace in the code behind.

...