Forums     Knowledge Base     OfficeWriter Online     
 
 
This documentation is for
OfficeWriter v3.7.1
ASP/COM Platform

View Docs for Another
Version or Platform

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:

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.

Example:

objTemplate.Process "file.xls", saProcessOpenInPlace



Copyright 2006 © SoftArtisans, Inc. All Rights Reserved.