Creating a new worksheet

Overview

The create worksheet instruction allows a user to create a new worksheet or replace an existing worksheet with a new worksheet within a particular Excel file. In either scenario, the instruction can be configured to create the new worksheet 1) in front of all existing worksheets in the file, 2) behind all existing worksheets in the file, or 3) before any particular worksheet in the file.

For the purposes of this article we are going to use a simple and fictitious Excel file. It has already been uploaded into a data step. You will want to replace this file with one of your own.

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 target file that we are going to use is a standard fresh Excel workbook which contains 3 empty worksheets.

Steps

1. Create a ‘Create worksheet’ instruction.

2. Link the file named “Target” as the target file.

3. In the New Worksheet Name field, type “New Worksheet”. The new worksheet will be created under the name of “New Worksheet”.

4. Set the rule for ‘Insert the new sheet at’ to Specific Index (this should already be the case by default).

5. Type into the Specific Index field or adjust the ticker next to this field to “2”. The specifies the order of the worksheet before which the new worksheet will be created. In this case therefore, the new worksheet will be created before Sheet2.

6. Save and run the step.

7. After the step finishes running, download and open the target file. It should resemble the following image:

Leave a Reply

Latest Tweets

Free eBook: 10 Tips for sourcing good data yucalc.com/2017/02/17/fre…

reply · retweet · favorite

Newsletter

By signing up, you agree to our Terms of Service and Privacy Policy.

Address

Suite 1506, Westfield Tower 2, 101 Grafton St Bondi Junction NSW 2022 Australia

View Larger Map

Contact Us

AUS: +61-2-9386-0202
UK: +44-20-8123-1251
Send us an email

ContactUs.com
WordPress Image Lightbox