CSV and EXCEL Datatables

Hello everyone.
Can someone please help me with this.
I am really stuck here and can’t keep going.
And I don’t know the reason why.
Here is what I am trying to do.
There are one config file, 2 csv files(I can’t upload csv file and so now I just uploaded as excel files), and the last two are also excel files.
Two csv files are APPROVER TABLE and HOLIDAY TAKEN files.
Two excel files are TRIAL4 and TRIAL7.
First, I want to join HOLIDAY TAKEN and TRIAL4 with the column name “holiday taken” & “holiday must take”.
Then I will output the data from joining those two tables.
After that,with that output data, I want to join APPROVER TABLE.
This time, the columns will be “Approved Person Code” & “employee number”.
The problem is since the beginning of joining two datatables, the data that should be come out doesn’t come out at all.
So, I wanna know that where am I missing and why doesn’t it work well between csv and excel.
Because when I did the same thing with all of the files are excel files and it is worked completely well. The result also came out correctly.
Please someone help me.
Thank you so much all.
approver table.xlsx (11.3 KB)
holiday taken.xlsx (11.1 KB) Trial4.xlsx (9.1 KB) ConfigFile2.xlsx (9.2 KB) new.xaml (17.6 KB) Trial7.xlsx (10.9 KB)

Hi @hsupyaewoon,

After reading the excel or csv file , every sheet will be a datatable for you.So, using a merge data table activity might be working for you , but it takes a variable amount of time based on the no.of records.
Best solution will be using linq queries , below is the example for joining tables.

(From a In DT1.Select()
Join b In DT2.Select()
On a(“Name”).ToString Equals b(“Name”).ToString
Select dt5.LoadDataRow (New Object() {
a.Field(Of String)(“Name”),
a.Field(Of String)(“City”),
a.Field(Of String)(“Country”),
b.Field(Of Double)(“ProjectID”)},False)).CopyToDataTable()

So , you can check a primay key column of two tables and concatenate.Hope this helps

Thanks
Mudhukrishna Lalapet

1 Like

Hello @Krishna_547
Thank you for your answer.
My apology for not understanding well.
By the way, I have some informations left to mention.
It is when I try to connect with names, it works well.
It just doesn’t work with numbers.
I don’t know why.
Can you please explain it for me?
Thank you.

Hi @hsupyaewoon ,

Column Numbers ?

1 Like

@Krishna_547
Not the column numbers.
It’s data.
When i try to join with the words data, it works.
But with the numbers data, it doesn’t come out.

Hi @hsupyaewoon,

Actually inside query , the row value(No matter what) is been converted to string So, it should convert the numbers also a text.

1 Like

Hi @Krishna_547
Yes. But I don’t know why it isn’t working.
When they are all excel files, it also worked well as you told, everything is converted into string.
But with the csv files, it doesn’t work anymore.
Can you please check my attached files? :cry:
Thank you…

Hello Mods.
This is solved in another post.

So, u can close it now.
Thank you so much.