How to Autofill the whole column in excel file UiPath
So many times we work with excel while automating a business process.
Sometimes we use formulas in certain columns to calculate the data in the previous columns.
Let’s assume we need to apply that formula to get the data for the whole column.
How we can achieve that?
By using the UiPath Activity we can achieve this task.
Activity Name: Auto Fill Range
In this example, let’s see how we can apply a formula in a certain cell to a particular range in the whole column.
Let’s jump into the practical implementation of this in UiPath Studio:
Firstly, the input excel data that we are using for this example is shown below:
Step1: Drag and Drop an Excel application Scope Activity from the activities panel to the designer panel as shown below:
Step2: Drag and Drop a Write cell activity from the activities panel to the designer panel to write the formula in the required column.
Step3: Drag and Drop Auto fill range activity from activities panel to the designer panel as shown below:
In write cell activity we used a simple formula that adds both values which are in column A and column B.
The formula is this =SUM(A2,B2)
This formula is written in the C column and applied to the rest of the column by using autofill range activity.
Let’s see the required properties for auto fill range activity:
- FillRange: Provide the cell range that we need to fill that formula as shown above.
- SheetName: Provide the sheet name that you want this to happen.
- SourceRange: Provide the cell value where the formula is written.
With this, we are done with the flow to autofill the whole column in the excel file.
Let’s see the output of this workflow that is shown below:
This is how we can use auto-fill range activity to autofill the whole column with the same formula while automating a business process.