ExcelTemplate ASP Reference
The ExcelTemplate Object
The ExcelTemplate object represents a template* spreadsheet, that 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.
See Using Template Spreadsheets,
ExcelApp.Open vs. ExcelTemplate and
for more guidance on when and how to use the ExcelTemplate object.
| * |
In the ExcelWriter documentation, the term "template" refers to an Excel file containing
data markers, not a Microsoft Excel template (.xlt). However, ExcelWriter can
open and generate both .xls and .xlt files. Use an .xlt file the same way you would an
.xls file. |
To create an instance of the ExcelTemplate object, use,
Set objTemplate = Server.CreateObject("SoftArtisans.ExcelTemplate")
Note:
- The ExcelTemplate object supports
Excel's BIFF8 (Excel 97/2000/XP) format only; ExcelTemplate does not support BIFF7 (Excel 95)
format templates, and will not generate BIFF7 format files.
(The ExcelApplication object
can produce either Excel 97/2000/XP (BIFF8) format files
or Excel 95 (BIFF7) format files.)
- ExcelWriterFree's 500 row limit applies to templates.
ExcelTemplate Methods and Properties
| ExcelTemplate Methods |
| AnsiToUnicode |
Converts an Ansi string to a Unicode string. |
| ContentType |
Sets or returns the generated spreadsheet's MIME content type. |
| DataSource |
Sets a data source to bind to template data markers. |
| Open |
Opens an ExcelWriter template spreadsheet. |
| PreserveStrings |
Sets whether ExcelWriter will insert all data source values into the
template as strings or try to convert non-string values (numbers, dates, etc.)
to Excel data types. |
| Process |
Enters database values in the template and generates a new spreadsheet. |
| SpreadsheetsCreatedToday |
Returns the number of spreadsheets ExcelWriter created so far, in a 24 hour period. |
| UnicodeToAnsi |
Converts a Unicode string to an Ansi string. |
Copyright © 2005, SoftArtisans, Inc.