P102 Copy Entire Sheet to the Same or new XLS File

/P#

Meaning

Extra Parameters: /1{Parameter1} … /n{Nth Parameter}

102

Copy entire sheet to the same or new XLS file.

/1 = sInputSheet (by name or by number)

/2 = sSheetBefore (by name or by number)

/3 = sSheetAfter (by name or by number)

/4 = lActionOnDuplicate ()

/5 = sTargetSheetRename

 

This special process can copy one entire worksheet to the same or new workbook.

Special Parameters Described in Detail

/1{sInputSheet} Specifies the name or index of the sheet to copy.

/2{sSheetBefore} Copied sheet will be placed before this sheet (Name or #). If this parameter is equal to "firstfirst", then the new sheet is placed as the first sheet in the workbook.

/3{sSheetAfter} Copied sheet will be placed after this sheet (Name or #). If this parameter is equal to "lastlast", then the new sheet is placed as the last sheet in the workbook.

/4{lActionOnDuplicates} Specification for how to handle duplicate named sheets. A duplicate exists if the sInputSheet already exists in the output file. 0=Copy sheet but give a slightly different name automatically, 1=Overwrite existing, 2=Skip this sheet and don't copy, 3=Stop processing if a duplicate is found.

/5{sTargetSheetRename} If you are copying a single sheet, you can specify the name of the sheet using this parameter. Leave blank to not rename.

Examples:

EXAMPLE 1: Copy entire sheet, and place it at the end of the workbook

EXAMPLE 2: Copy entire worksheet from one workbook to a new workbook