Hi i am working on excel this after comparing i am getting all trxn that are not common now i want to append them in a already created sheet but i want to add a status as Not available against each of them
how can i do that as if i use write cell activity it might fail as application used by someother app when running for 100 -500 trxn or this way will take lot of time
1.Use the “Read Range” activity to read the data from your existing Excel sheet into a DataTable.
2.After comparing the data, you should have a list of transactions that are not common. Create a DataTable to hold these new rows and add a “Not available” status column to it.
Append Data:
3.Combine the existing DataTable with the new DataTable (with “Not available” status) using the “Merge DataTable” activity.
Write Data Back to Excel:
4.Use the “Write Range” activity to write the merged DataTable back to the Excel sheet. This will append the new rows with the “Not available” To status
@Praveen_Mudhiraj i have the not common data in dt but how to add not available to each and every trxn of that dt
Can you provide sample data so i will test and provide xaml to you
One way to add a common string across the datatable is as beow
- If the column status is not aready present first use add dtaa column and add the column you need…if present then thsi step is kot needed
- Use this in assign
dt.Columns("Status").Expression = "'Not Available'"
This will add not avaiable to all the rows in the datatable
Hope this helps
Cheers
@Praveen_Mudhiraj
Input1.xlsx (8.2 KB)
Input2.xlsx (8.3 KB)
ON COMPARING WITH excel1 with excel 2
we found out that T7 is not available so now due other business logic i have one sheet created excel 3
THAT has failed data already added up
now i want to add T7 lets take its not only 1trxn but 1000 trxn then i cannot use write cell to append the data as that will take time as i need to add the status as NOT AVAILABLE under status
post comparing.xlsx (8.3 KB)
@Anil_G will try and let you know
One more thing…without the second expression you can add the data to the default value property in the add data column properties panel…which will directly add the required data to all the rows
Hope this helps
Cheers
Left of equals should be present on left side and right of equals should be present in right
Cheers