The [highlight txt=’copy row’] instruction allows a user to copy whole rows of data within a particular Excel worksheet into another Excel worksheet.[message type=”warning”]For the purposes of this article we are going to use two simple and fictitious Excel files. They have already been uploaded into a data step. You will want to replace these files with those of your own.[/message]
Before we get started
Please further create a ‘Manipulate a file’ or ‘Multiple file manipulations’ action step so that you can add and use instructions.
The source file that we are going to use looks like this:
The target file that we are going to use is a standard fresh Excel workbook which contains 3 empty worksheets.
1. Create a ‘Copy row’ instruction.
2. Link the file named “Source” as the source file and the file named “Target” as the target file.
3. Select Sheet1 from both files.
4. Type into the field to the Source Row field or adjust the ticker next to this field to “1”. This specifies the row number of the row to be copied.
5. Type into the field to the Target Row field or adjust the ticker next to this field to “2”. This specifies where the data will be copied to.
6. Save and run the step.
7. After the step finishes running, download and open the target file. It will resemble the image below: