CopyOptions
CopyOptions class
Represents the copy options.
class CopyOptions;
Constructors
Name | Description |
---|---|
constructor() | CopyOptions constructor. |
Properties
Property | Type | Description |
---|---|---|
keepMacros | boolean | Indicates whether keeping macros; |
extendToAdjacentRange | boolean | Indicates whether extend ranges when copying the range to adjacent range. |
copyNames | boolean | Indicates whether copying the names. |
copyInvalidFormulasAsValues | boolean | If the formula is not valid for the dest destination, only copy values. |
columnCharacterWidth | boolean | Indicates whether copying column width in unit of characters. |
referToSheetWithSameName | boolean | In ms excel, when copying formulas which refer to other worksheets while copying a worksheet to another one, the copied formulas should refer to source workbook. However, for some situations user may need the copied formulas refer to worksheets with the same name in the same workbook, such as when those worksheets have been copied before this copy operation, then this property should be kept as true. |
referToDestinationSheet | boolean | When copying the range in the same file and the chart refers to the source sheet, False means the copied chart’s data source will not be changed. True means the copied chart’s data source refers to the destination sheet. |
constructor()
CopyOptions constructor.
constructor();
keepMacros
Indicates whether keeping macros;
keepMacros : boolean;
Remarks
Only for copying workbook.
extendToAdjacentRange
Indicates whether extend ranges when copying the range to adjacent range.
extendToAdjacentRange : boolean;
Remarks
If it’s true, only extends the range of the hyperlink,not adding a new hyperlink when copying hyperlinks to adjacent rows.
copyNames
Indicates whether copying the names.
copyNames : boolean;
copyInvalidFormulasAsValues
If the formula is not valid for the dest destination, only copy values.
copyInvalidFormulasAsValues : boolean;
columnCharacterWidth
Indicates whether copying column width in unit of characters.
columnCharacterWidth : boolean;
referToSheetWithSameName
In ms excel, when copying formulas which refer to other worksheets while copying a worksheet to another one, the copied formulas should refer to source workbook. However, for some situations user may need the copied formulas refer to worksheets with the same name in the same workbook, such as when those worksheets have been copied before this copy operation, then this property should be kept as true.
referToSheetWithSameName : boolean;
Remarks
The default value is true.
referToDestinationSheet
When copying the range in the same file and the chart refers to the source sheet, False means the copied chart’s data source will not be changed. True means the copied chart’s data source refers to the destination sheet.
referToDestinationSheet : boolean;
Remarks
The default value is false, it works as MS Excel. For example: if copying a chart with the data source “sheet1!A1:B10” from worksheet “sheet1 to other worksheet “sheet2”, The data source will be changed as “sheet2!A1:B10”