PreviousNext
Help > Programming with LAUNCHER Office > LNCCMD commands > Commands list > XLSAVEAS command
XLSAVEAS command

Saves the current EXCEL workbook. 

 

Syntax

 

CHGVAR

VAR(&CMD) VALUE('XLSAVEAS')

CHGVAR

VAR(&PARM1) VALUE('[file]')

CHGVAR

VAR(&PARM2) VALUE('

[Format=constant]

[;Replace=True/False]

[;Backup=True/False]

')

CHGVAR

VAR(&PARM2) VALUE('Options')

CALL

PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 +

&PARM2 &RESULT)

 

Parameters

 

Parameters

 

Parm1


Path and save name of the current workbook.

If this parameter is empty, the document will be saved with the name under which it was opened.

 

Parm2


Format
= format for saving the document.

The format must be consistent with the extension of the saved file.
You can use the
Excel syntax:

xlAddIn, xlCSV, xlCSVMac, xlCSVMSDOS, xlCSVWindows, xlDBF2, xlDBF3, xlDBF4, xlDIF, xlExcel2, xlExcel3, xlExcel4, xlExcel4Workbook, xlExcel5, xlExcel7, xlExcel9795, xlHTML, xlIntlAddIn, xlIntlMacro ...

or the following keywords:
- XLS
- XLSX
- XLSM

Note: If you do not set the Format parameter, then the default MS Excel format is used. Example: XLSX for Excel 2016.

Replace = True/False. False by default. Replace the file if it exists if Replace=True.

Backup = True/False. False by default. True to create a backup file.

 

Examples 

 

1)

LNCCMD CMD(XLSAVEAS) PARM1('c:\temp\res.xlsx') PARM2('format=XLSX')

2)

LNCCMD CMD(XLSAVEAS) PARM1('c:\temp\res.xlsm')PARM2('format=XLSM')

3)

 

CHGVAR

VAR(&CMD) VALUE('XLSAVEAS')

CHGVAR

VAR(&PARM1) VALUE('c:\chemin\sauvegarde.xlsx')

CHGVAR

VAR(&PARM2) VALUE('Replace')

CALL

PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 +

&PARM2 &RESULT)

 

 

See also

 

XLADDSHEET

XLDELSHEET

XLGOTOSH