DIAdem Help

Content Type
Programming Language
Current manual

Method: SaveAs for Workbook

Method: SaveAs for Workbook

Saves an Excel workbook.

bSaveAs = Object.SaveAs(Filename)
ObjectWorkbook
Object with this method
FilenameString
Specifies the path and the name of the Excel file. You must enter the filename extension.
bSaveAsBoolean
Specifies whether saving was successful (TRUE) or not (FALSE).

The following example creates an Excel workbook, fills the first cell in the first worksheet with the value 3.14, and saves the Excel workbook in a new XLSX file. Refer to the help page Workbook for detailed examples:

VBScriptPython

 

Dim oMyWorkbook, oMySheet 
Set oMyWorkbook = CreateExcelWorkbook() 
Set oMySheet = oMyWorkbook.Worksheets(1) 
oMySheet.Cells(1, 1).Value = 3.14
Call oMyWorkbook.SaveAs(DataWritePath & "Test.xlsx")
In This Section
Was this information helpful?