|
Programmer's Reference
> ExcelTemplate
> Process
Process Method
Syntax:
Public Function 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:
| 0 | saProcessDefault | Save the file to disk |
| 1 | saProcessOpenInExcel | Open the file in Excel |
| 2 | saProcessOpenInPlace | Open in the browser |
| 3 | saProcessOpenForScripting | Return the file in
memory as an
ExcelApplication
object. Note: This value is not available in
ExcelWriterSE. |
Example:
objTemplate.Process "file.xls", saProcessOpenInPlace

Copyright 2006 © SoftArtisans, Inc. All Rights Reserved.
|