Show code in...     

  

 

ExcelTemplate Properties: ContentType ExcludeMacros LicenseKey PreserveStrings
RemoveExtraDataMarkers SpreadsheetsCreatedToday Version
ExcelTemplate Methods: Open Process Save SetCellDataSource SetColumnDataSource SetDataSource SetRowDataSource


ExcelTemplate .NET Reference

ExcelTemplate Object

New in V5


The ExcelTemplate object represents an ExcelWriter template spreadsheet. An ExcelWriter template is a file created in Microsoft Excel that contains data markers. A data marker specifies a database column, variable, or array to insert in the spreadsheet column containing the marker.

The ExcelTemplate object is in the SoftArtisans.OfficeWriter.ExcelWriter namespace. The object can be referenced as SoftArtisans.OfficeWriter.ExcelWriter.ExcelTemplate. To minimize typing and errors, use an Import directive to import the namespace to the aspx page, and reference the object as ExcelTemplate, without the namespace prefix. If you are coding directly in the .aspx page, following the Page directive, include:

	<%@ Import Namespace="SoftArtisans.OfficeWriter.ExcelWriter" %>

If you are coding in the code-behind page (.aspx.vb or .aspx.cs), include an Imports or Using statement at the top of the code-behind page:

	In VB.NET: 	Imports SoftArtisans.OfficeWriter.ExcelWriter
	In C#:	 using SoftArtisans.OfficeWriter.ExcelWriter;

To create an instance of the ExcelTemplate object use:

	In VB.NET:	Dim oExcelTemplate As New ExcelTemplate()
	In C#:	ExcelTemplate oExcelTemplate = new ExcelTemplate();

SoftArtisans.OfficeWriter.ExcelWriter.ExcelTemplate is a native .NET version of the ExcelTemplate object, introduced in version 5. If you have previously done .NET development using the Interop version of the ExcelTemplate object (SoftArtisans.ExcelWriter.ExcelTemplateClass or SoftArtisans.ExcelWriter.ExcelTemplateDotNet) your previous code and templates will still work. However, for best performance, we recommend upgrading to the pure .NET version of ExcelTemplate. This will require some code changes and (in rare cases) modifications to your template spreadsheets. For more information, see Migrating ExcelTemplate Applications from Interop to Pure .NET.

ExcelTemplate Properties ExcelTemplate Methods


Copyright © 2005, SoftArtisans, Inc.