Excel Sheet Pasting Issue

Hi there,

I’m currently facing a problem when passing the data from xml script to excel sheet. From xml script, I extracted both law and aml as result as below.
Capture

But when the time I pass this data to excel sheet, the output failed with missing aml data.
Capture1

How am I going to fix this error? I appreciate any assistance from you.
Thanks and best regards.

explain more about the issue to analyse.

how you are passing value to excel, how you are storing the data after fetching from xml. is it a string or datatable or any other.

Hi,

Here are my xaml, xml and excel file. test.xlsx (8.6 KB) law aml sample.xml (2.8 KB) test.xaml (62.6 KB)

From the xml script, you can see at the node with pfSeqNo 7, there’s two child nodes with aml and law tag. I want to pass the data of their pfd tag to the excel sheet. But I can only get the result of aml : DEF and there’s missing of law : ABC at excel sheet.

when you are looping through the optlist(contains two pf)
and getting the values based on Pfi in if condition then assign either value(Pfd) else string.empty

in first loop it will assign law=ABC and AML=null
the second time it will assign law= null and AML=DEF

So when you are writing to excel it is showing as blank.

Suggestion: use add datarow inside loop(optlist).

image

What kind of datarow to be used? Add inside the if activities?

not inside if, after all if conditions inside for each loop add datarow activity,

or

inside of if condition assign only the pfd value and dont assign it as string.empty

Can you help to modify the workflow? I’m quite confusing with this.
Thanks in advance :’)