...
Now the template file is done. Next is writing the code to bind the string value to the data marker.
Writing the code
// ExcelTemplate
Code Block | ||
---|---|---|
| ||
using SoftArtisans.OfficeWriter.ExcelWriter; ExcelTemplate oXLT = new ExcelTemplate(); oXLT.Open(Page.MapPath("Hello World.xlsx")); DataBindingProperties oDataProps = oXLT.CreateDataBindingProperties(); string value = DataValueBox.Text.Trim(); oXLT.BindCellData(value, "DataValue", oDataProps); oXLT.Process(); oXLT.Save(Page.Response, "Output.xlsx", false); |
...