I want to see invoice no from 1 file and billing document from one and match both need to extract Some number and date from my 1 file and write to the 2 file if i get same invoice no
How i can do this?
- Drag and drop an “Excel Application Scope” activity onto the workflow canvas.
- In the properties panel of the activity, specify the path of the first file you want to extract data from.
- Inside the scope, add a “Read Range” activity and assign the output to a DataTable variable (e.g.,
dtSource
). - Add another “Excel Application Scope” activity.
- Set the File property of the new “Excel Application Scope” activity to the path of the second file you want to write the extracted data to.
- Inside this new scope, add a “Read Range” activity and assign the output to another DataTable variable (e.g.,
dtDestination
). - Add a “For Each Row” activity and set the DataTable property to
dtSource
. - Inside the “For Each Row” activity, add an “If” activity.
- In the “If” activity, use a condition to check if the invoice number in the current row (
row("InvoiceNumber")
) exists indtDestination
. You can use the “Filter Data Table” activity to perform this check. - If the invoice number is found, extract the desired data from the current row, such as
row("Number")
androw("Date")
. - Use the “Write Cell” or “Write Range” activity to write the extracted data to the corresponding row in
dtDestination
. - Close the “Excel Application Scope” activities.
- Finally, use an “Excel Application Scope” activity to write
dtDestination
back to the second file, saving the changes.
Hope it helps!!