Clearing cell ranges
The [highlight txt=’clear cell range’] instruction allows a user to clear the contents and/or the formatting from a cell or a range of cells within a particular Excel worksheet.
Before we get started
For the purposes of this article, it would be preferable if you can have at hand a Excel file containing data and formatting. Please also create a data step with a ‘File upload/download’ property and upload the file into the property. Please further create a ‘Manipulate a file’ or ‘Multiple file manipulations’ action step so that you can add and use instructions. The file that this article will refer to looks like this:
1. Create a ‘Clear cell range’ instruction.
2. Link the file.
3. Select a worksheet. Here, we will select Sheet1.
4. Use any cell you wish. Here, we will use an Advanced Range from cell A1 to cell C3.
5. Tick the box next to ‘Clear cell format?’.
6. Save and run the step.
7. If you open the file after the step finishes running, you will see that the cell range specified above is devoid of contents and formatting.