Show code in...     

  

 

ExcelTemplate Methods: AnsiToUnicode ContentType DataSource Open
PreserveStrings Process SpreadsheetsCreatedToday UnicodeToAnsi


ExcelTemplate ASP Reference

Process Method


Syntax:
Public Function ExcelTemplate.Process(FileName As String,
                         ProcessMethod As SAProcessMethod,
                         ExcludeMacro As Long) Application As ExcelApplication
Description:

Enters data source values in the template and generates a new spreadsheet. The Process method takes three parameters:

FileName Path and file name of the new spreadsheet
ProcessMethod Optional. Specifies whether to save the file to disk, open it in Excel, open it in the browser, or return an ExcelApplication object. Default value: 0 (saProcessDefault)
ExcludeMacro Optional. If set to True, macros in the template will be excluded from the generated spreadsheet.

When ExcludeMacro is enabled, buttons associated with macros may produce the error "Data may have been lost." Therefore, when excluding macros, remove all associated buttons from the spreadsheet.
Default value: False

Assign the ProcessMethod parameter by name or number:

0saProcessDefaultSave the file to disk
1saProcessOpenInExcelOpen the file in Excel
2saProcessOpenInPlaceOpen in the browser
3saProcessOpenForScriptingReturn the file in memory as an ExcelApplication object.
Note: This value is not available in ExcelWriterSE, ExcelWriterLE, or ExcelWriterFree.
Example:
objTemplate.Process "file.xls", saProcessOpenInPlace


Copyright © 2005, SoftArtisans, Inc.