needed like this
First from website we extract data and saved in excel file.
Then in that excel file we need some rows as per the requirement to be excluded and consider that excluded excel file as datatable input & then filter datatable with status column having “yes” & consider them as transaction data.
By considering that transaction data,in process we need to extract again and exclude rows required & compare rows with the transaction data & update comments in excel report.
Please help anyone
Either insert your excel to the queue or use datarow in re instead of queue item for transaction item
Thanks for sharing.
I have one requirement where need to extract data from website & copied to excel file. Then we have to filter data table with specific column “status” having “no” value. Filtered data table is used as transaction data to process further.
After starting process we have to re extract again data from website for 3 times with delay of 10 sec & checkmark to change status& compare if transaction data row status column value changed to “yes” or “no” .If “yes” we have to add comment as “status changed”. If “no” we have to add comment as “status not changed” in same Excel In new column.
But problem is sometimes specific rows with status “no” needs to be excluded to process. That row should be avoided while executing further steps.
Is that possible? Please help anyone
- Use Filter DataTable activity to filter rows with “status” column having a value of “no”. Save as
filteredData
- Use a For Each Row for
filteredData
.
—>extract the required information and perform the desired processing steps.
—>After processing, use a Delay activity to wait for 10 seconds before proceeding to the next iteration. - After the delay, extract data from the website again and store it in a new DataTable
newData
- Compare the “status” column of each row in the
filteredData
with the corresponding row innewData
. If the status has changed then write “status changed” in a new column in thefilteredData
else write “status not changed” in the same new column. - If there are specific rows in the
filteredData
that should be excluded from further processing, you can add an additional condition to check if the row meets the criteria for exclusion. If the row meets the exclusion criteria, skip the processing steps for that row and move on to the next row. - After all the processing and status checks are done, write the
filteredData
back to the Excel file, including the added comments.
Hope it helps.
Thanks.
But rows to be excluded is only on specific days in a month. Scheduling the process for every hour to run from Orchestrator. As of now Input is taken from excel & process. But when rows to be excluded excel file needs to be placed by team & that file needs to be considered as input. Is that possible after scheduling?
Please help
- Store the file path in assets
- In the beginning of the process, use “Get Asset” activity in UiPath to retrieve the excel file path. This will allow you to use the latest file provided by the team.
- Use If to check current date matches the specific days in a month when rows need to be excluded, then proceed with reading the exclusion list from the provided file. Otherwise, skip this step and continue with the regular process without excluding any rows.
- If the current date matches the specified days, read Excel file, and filter the data to exclude the specific rows as required. Proceed with the rest of the processing, considering only the filtered data.
Thanks. We don’t know before when the rows needs to be excluded.
For eg we want row to be excluded tomorrow they will exclude that row in that file tomorrow only.
Watch the below Youtube video which give you better understanding to work with reframeworks with input excel file.
Hope it helps!!
So that’s why we are using If condition:
- Obtain the current date and compare the current date with the dates in the
exclusionList
DataTable to identify if any rows need to be excluded on that specific day. - If the current date matches any date in the
exclusionList
, filter out the rows that should be excluded. Create a new DataTablefilteredData
containing only the rows that should be processed.
Ok Will try it.Thanks
Please share any sample workflow related to this if you have
Thanks. Will check the video.
not able to compare current date with specific date in data table of exclusion list. Can you please share sample workflow?
So for comparing without using for each, you can try like this:
- Use the “Filter Data Table” activity to filter the
dtExclusionList
based on the “ExclusionDate” column. Give like this in filter wizard
“[ExclusionDate] = '” + DateTime.Now.ToString(“yyyy-MM-dd”) + “'”
This will filter the rows with an “ExclusionDate” that matches the current date.
Hope it helps.