Copy from Excel

Copy the specified cell values from an Excel file and store them in a new or existing variable.

  • You don't need Excel installed to use or to run this command unless you are using 'select range' in the command editor.

  • The greyed-out fields and options become enabled after a file is selected.

  1. Enter the name of the Excel file from which you want to copy cell values:

    • Enter a variable.

      To use a variable in this field, enclose its name between two $ signs (e.g., $MyVar$). When the wizard is executed, the variable name will be substituted with its corresponding value.
    • Enter text.

    • Click Browse and select the Excel file from which you would like to copy cell values.

  2. If the selected Excel file is password protected, enter the password.

  3. Specify the worksheet and cells from which to copy values:

  4. Click Test to display a sample of the data that will be copied based on your selections.

  5. Select whether to copy the values as Actual Values or Formatted Text.

    Should you use Actual Values or Formatted Text as the copy method?

    It's important to use the Formatted Text option when the relevant cells are formatted as dates. Otherwise, the values returned will be the sequential serial numbers for the dates in the Excel sheet. (For example: January 1, 2008 = serial number 39448 because it is 39,447 days after January 1, 1900 (serial number 1).

    For reading all other cells, use the Actual Values option.

    Also, Formatted Text provides the exact same text as in Excel. To avoid having fields presented as ####, the columns need to have the proper length - which you can do directly in Excel or by using Macro. You can also use the Run Macro Advanced Command to perform this action.

  6. Specify options for saving the data:

    • Enter the name of the variable into which you'd like to store the copied values.

    • Enter the delimiters to be used for separating each column and row in the returned data.

  7. Expand the Error handling option to provide instructions to the wizard on how to manage encountered errors.

    For more information on error handling, see Error handling.

  8. (Optional) Select Enable timeout monitoring.

    For more information on timeout monitoring, see Timeout Monitoring.