Issue with data merging from excel

Hello All,

I have downloaded files from multiple insurance company websites. from each file i need only few columns irrespective of columns positions. For that I mentioned separate workflows for each company to pick few required columns.
In the Main Output file, If I run the 1st insurance company I’m getting columns as per my requirement but when I run for other, previous data is also repeating for 1st company and then appending the 2nd company data. Every time I run I’m getting duplicates.
How to sort this issue?

@ramshiva_reddy

Before getting new data check if the datatable is empty or not…looks like you are reading the data or storing it before the next file

Cheers

Hello,

I have cleared the data table. Even though I’m getting the same issue

@ramshiva_reddy

Can you show your flow…ideally if you clear you should not be…somewhere it is getting appended…try to perform step into and check where the data is getting added using locals panel

cheers

Hello,
Please check the images.



t

@ramshiva_reddy

As per screenshot I can see you are reading the data that is present in sheet1 and then adding data on top of it and then appending…

so in sheet1 if there are 10 rows…you are reading those 10 and adding 10 more and then appending 20 to the existing 10…which makes it 30 rows…

either remove reading or change append to write

cheers

Hello,

1st read range is the file with headers I want to write the final output.
2nd read range is the data which I pick only few columns which I mentioned in the Add Data Row activity. and then I’m appending the data by giving append range activity by passing 1st read range activity.

@ramshiva_reddy

so you mean the first read range file does not have any data in it?

cheers

Hello,

Yes When I run for the first insurance there won’t be any data apart from headers.
And when I run for the 2nd insurance there will be only previous data(1st Insurance).
But here when I run for 2nd insurance I’m getting 1st and 2nd insurance data.

@ramshiva_reddy

exactly that is the problem…have a clear range after the read …because you are reading file with data and datatable already has data from second file

cheers

Okay bro,
But what if they are in separate Sequence?
1st insurance in one xaml file and 2nd insurance in other xaml file??

@ramshiva_reddy

in any sequence…when you use read range …it will read whole data if present

cheers

Bro,
For 1st sequence Its OK, but from 2nd sequence I mentioned clear data table after 1st read range activity clearing that variable. It worked.

Cheers

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.