How to Filtering and Writing Excel Data in UiPath
Introduction
In this article, we will explore a UiPath workflow that automates the task of reading data from an Excel file, filtering it based on specific criteria, and writing the filtered data back to the Excel file on a different sheet. This type of automation is useful for data processing tasks like cleaning, transforming, or reporting Excel data.
This UiPath workflow automates the process of reading, filtering, and writing data in Excel. Here’s a brief overview:
Step 1: Read Data from Excel
- Read Range Workbook: Reads data from input.xlsx (Sheet1) into a DataTable (Dt), with headers enabled.
- Assign : Create an variable Arrdt assign the value is “Dt.AsEnumerable.Where(Function(r) Double.TryParse(r(“BB”).ToString,Nothing)).ToArray() “
Step 2: Filter Data
- Condition: Filters rows where the “BB” column contains numeric values using a LINQ query.
- If Condition:
- True: Converts filtered rows to a new DataTable (Finalresult).
- False: Creates an empty DataTable with the same structure as Dt.
Step 3: Write Filtered Data
- Write Range Workbook: Writes Finalresult to Sheet2 in the same Excel file, with headers.
Conclusion: Â Â Â Â Â Â Â Â Â Â Â Â
By combining Excel automation with filtering capabilities, UiPath allows users to automate complex data processing tasks with ease. This workflow demonstrates how to filter Excel data based on numeric conditions and write the results to a new sheet, simplifying data handling and transformation.
Also Read – How To Filtering Excel Data In UiPath