Skip to main content

Save-Excel

Command Description

Save the specified Excel

Command Prototype

Excel.Save(objExcelWorkBook)

Parameter Description

ParameterRequiredTypeDefaultDescription
objExcelWorkBookTrueexpressionobjExcelWorkBookExcel workbook object (workbook opened with "Open Excel" command (Excel.OpenExcel) or the workbook object returned by the command "Bind Excel" (Excel.BindBook))

Demo

/********************Save Excel workbook************************** **** 
**Input 1:
** objExcelWorkBook -- Excel workbook object (a workbook opened using the "Open Excel" command (Excel.OpenExcel) or a work bound using the "Bind Excel" command (Excel.BindBook) book object).
**
*********************************************************************/

objExcelWorkBook = Excel.OpenExcel(@res"Test.xlsx",True,"Excel","","")
Excel.Save(objExcelWorkBook)
TracePrint "Save Excel Workbook: Excel file 'test.xlsx' has been saved"
Excel.CloseExcel(objExcelWorkBook,False)