Data Discrepancy Excel- URGENT

As u can see in excel in 3rd row this value is not coming as per invoice value.
image

whereas in invoice 3rd row is having the value :

Where could be the issue in code..?

@Srini84 @kumar.varun2 @GreenTea

Your Code is duplicating rows. 2nd, 4th, 6th, 8th and 10th rows are getting duplicated.

@mitul_choudhary

How are your extracting the line item to excel sheet, as we see there are duplicate rows which copies the previous row value

Thanks

@Srini84 @vikasrawat911
Yes, how can i identify it & sort it out…?

@Srini84 @vikasrawat911 @kumar.varun2

Please Suggest…!!

@mitul_choudhary

Can you share your workflow and project.json and example invoices you are working
because its difficult to say without seeing these

Thanks

How can i share it…?

@mitul_choudhary

You can zip your project folder and samples folder and send in a message to me if data is confidential

Thanks

Do one thing - you can get Distinct rows using -

dtInvoice = dtInvoice.DefaultView.ToTable(true, “Description”, “UnitPrice”)

If this solves your problem please mark it as solution.

Thanks where should i put it…?

One you have created your Excel, you can read the excel in a DataTable and then use the expression I provided and then output in a new Excel.