CopyRange

Copy a specifed range in the workbook.

Overloads

Overload Name Description
ColumnWidth Copy the column widths of a specified range.
FromFile (7.7) Copy a specified range from an Excel or delimited file into the current view.
General Copy a specified range.
RowHeight Copy the row heights a specified range.
Specify Copy a range and specify the paste options.
ToClipboardAsImage (8.0) Copy a specified workbook range to the clipboard as an image.
ToFileAsImage (8.0) Copy a specified workbook range to an image file.


ColumnWidth

Copy the column widths of a specified range.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CopyRange The address of the range to copy.
PasteRange The address of the range to paste into.

FromFile (7.7)

Copy a specified range from an Excel or delimited file into the current view.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
Filename Specify the name of the file to copy from.
Folder Specify the full path to the folder to put the file in. If left blank the Desktop folder will be used.
CopyRange The address of the range to copy.
PasteRange The address of the range to paste into.
OutputRangeName (8.0) The range where the range is imported to will be given the specified name.
InsertPolicy Determines whether/how to insert the copied range. If not specified then the copied range will overwrite the paste range.
= Overwrite the paste range
Rows = Insert the number of rows in the from-range at the first row of the paste range.
Columns = Insert the number of columns in the from-range at the first column of the paste range.
RowsAndColumns = Insert both rows and columns.
ShiftCellsRight = Shift the cells in the paste range to the right.
ShiftCellsDown = Shift the cells in the paste range to down.
Specify one of the following values or an arbitrary value: <blank>RowsColumnsRowsAndColumnsShiftCellsRightShiftCellsDown
PasteType Specifies the type of copy to perform.
Specify one of the following values or an arbitrary value: <blank>AllColumnWidthsCommentsFormatsFormulasFormulasAndNumberFormatsValidationValuesValuesAndNumberFormats
PasteOperation Specifies an operation to perform on the numbers of the copied data (Add, Subtract, Multiply, or Divide).
Specify one of the following values or an arbitrary value: <blank>NoneAddSubtractMultiplyDivide
CopyColumnWidths Whether to copy the column widths of the copy range. If left blank TRUE will be used.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CopyRowHeights Whether to copy the row heights of the copy range. If left blank TRUE will be used.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
SkipBlanks If cells in the copy range are empty, then the corresponding cells in the paste range are left unchanged. Defaults to FALSE if left blank. For consistency with the standard paste tool, this value should be set to TRUE.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
Transpose Rows become columns. Columns become rows.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
Password
If the copy-from workbook is password-protected, specifies the password assigned to the workbook.
NOTE: The password is currently only supported for XLS files that are saved from Excel 2010.

General

Copy a specified range.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CopyRange The address of the range to copy.
PasteRange The address of the range to paste into.
Cut (8.0) If true the values of the cells copied from will be cleared.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
InsertPolicy (7.7) Determines whether/how to insert the copied range. If not specified then the copied range will overwrite the paste range.
= Overwrite the paste range
Rows = Insert the number of rows in the from-range at the first row of the paste range.
Columns = Insert the number of columns in the from-range at the first column of the paste range.
RowsAndColumns = Insert both rows and columns.
ShiftCellsRight = Shift the cells in the paste range to the right.
ShiftCellsDown = Shift the cells in the paste range to down.
Specify one of the following values or an arbitrary value: <blank>RowsColumnsRowsAndColumnsShiftCellsRightShiftCellsDown

RowHeight

Copy the row heights a specified range.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CopyRange The address of the range to copy.
PasteRange The address of the range to paste into.

Specify

Copy a range and specify the paste options.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CopyRange The address of the range to copy.
PasteRange The address of the range to paste into.
Cut (8.0) If true the values of the cells copied from will be cleared.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
InsertPolicy (7.7) Determines whether/how to insert the copied range. If not specified then the copied range will overwrite the paste range.
= Overwrite the paste range
Rows = Insert the number of rows in the from-range at the first row of the paste range.
Columns = Insert the number of columns in the from-range at the first column of the paste range.
RowsAndColumns = Insert both rows and columns.
ShiftCellsRight = Shift the cells in the paste range to the right.
ShiftCellsDown = Shift the cells in the paste range to down.
Specify one of the following values or an arbitrary value: <blank>RowsColumnsRowsAndColumnsShiftCellsRightShiftCellsDown
PasteType Specifies the type of copy to perform.
Specify one of the following values or an arbitrary value: <blank>AllColumnWidthsCommentsFormatsFormulasFormulasAndNumberFormatsValidationValuesValuesAndNumberFormats
PasteOperation Specifies an operation to perform on the numbers of the copied data (Add, Subtract, Multiply, or Divide).
Specify one of the following values or an arbitrary value: <blank>NoneAddSubtractMultiplyDivide
SkipBlanks If cells in the copy range are empty, then the corresponding cells in the paste range are left unchanged. Defaults to FALSE if left blank. For consistency with the standard paste tool, this value should be set to TRUE.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
Transpose Rows become columns. Columns become rows.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE

ToClipboardAsImage (8.0)

Copy a specified workbook range to the clipboard as an image.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CopyRange The address of the range to copy.
ScalePercent Scale the image with a value between 10 and 400. If left blank 100 will be used.

ToFileAsImage (8.0)

Copy a specified workbook range to an image file.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
Specify one of the following values or an arbitrary value: <blank>SheetNameSheetNumberAllSheets
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy. If SpecifySheetBy is AllSheets then SheetSpec can be left empty.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
CopyRange The address of the range to copy.
ScalePercent Scale the image with a value between 10 and 400. If left blank 100 will be used.
ImageFormat The format of the image file (If left blank Bmp will be used.):
Bmp Bitmap
Emf Enhanced metafile
Exif Exchangeable Image File
Gif Graphics Interchange Format
Icon Windows icon
Jpeg Joint Photographic Experts Group
Png W3C Portable Network Graphics
Tiff Tagged Image File Format
Wmf Windows metafile
Specify one of the following values or an arbitrary value: BmpEmfExifGifIconJpegPngTiffWmf
ImageFilename Specify the name of the file image file.
Folder Specify the full path to the folder to put the file in. If left blank the Desktop folder will be used.
IncrementFilename
Whether to add a subscript, such as (2), to the filename if the specified file already exists.
If not set to TRUE, an existing file with the same name will be overwritten.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
UseDialog Whether to show the Save File dialog to allow the user to select the folder and filename.
Specify one of the following values or an arbitrary value: <blank>FALSETRUE
DialogResultPropertyName The name of the script property to hold the FileDialog form result.
FullFilePathPropertyName The full path of the file that is saved.