Get specific Excel column values (two column values with same column name but with different column positions) based on one source column(Let's say source column is A))

Hi friends, @aanandsanraj ,I have another excel file where I need to get client-wise DIFF values. The problem is there are two DIFF columns and I want to get two DIFF values for the respective clients.

But the challenging part is DIFF columns position will change for some clients. PLease find the attached file below. the attached excel file has different structure.



Test_Dec02.xlsx (53.3 KB)

Please find the attached excel file for your reference suggest me how to get those two DIFF values for the respective clients like the one you have done for the yesterday file.Test_Dec02.xlsx (53.3 KB)

Hi @eshwarsai_ks,

I hope the attached xaml will help you try it
Process.xaml (17.5 KB)

1 Like

I will check and get back to you @aanandsanraj Thank you so much for your time :slight_smile:

Hi @aanandsanraj , Thanks a lot :slight_smile: I have tested the code, I’m happy to see that the output file had the required data(expected output). but getting the below error

@eshwarsai_ks

Check on this xaml Process.xaml (19.6 KB)

1 Like

After the Output file is created , the data inside the excel is accurate but I don’t know why the below error is popping up bro. RObot has to stop the code…instead it is giving the below error

It looks like the dtOutput datatable is empty. That error is just basically saying “I cannot count when there is nothing to count”

A better check would be as suggested here : How to know if DataTable is null or Empty

Just ensure your logic is handled in the correct sequence (true, false) when you use the solution in the above link.

1 Like

Thanks @jeevith, It worked :slight_smile:

It worked well @aanandsanraj. Thank you so much :slight_smile:

Hi @aanandsanraj , just noticed that for one client(ERA SAMSUNG BUNDLING) , there are no DIFF values filled by the robot.
output file.xlsx :
image

SOurce file :


the above DIFF values are not available in the Output.xlsx file

Please suggest me if any @aanandsanraj

Thank you :slight_smile:

@eshwarsai_ks
Is this the same file you shared earlier?

Yes @aanandsanraj. same file

@eshwarsai_ks

Because ERA SAMSUNG BUNDLING “DIFF” column is mentioned in next row it is not like rest of the clients. All other client has it in the same row.

1 Like

Very true @aanandsanraj. Thanks a lot for your quick update :slight_smile: