Skip to main content
Pathfinder Advocate | Tier 6
November 27, 2023
Question

I have two excel sheets both have more than 40000 rows.. sheet1 has 8 columns, sheet2 has 16 columns. Based on values of two columns in sheet1 I need to get corresponding rows from sheet2. Which package would work best?

  • November 27, 2023
  • 16 replies
  • 383 views

For example, there is Price and OrderID in sheet1. if i find the same price and order id in a row in sheet2, i need to get that row, and copy some cells into sheet1 opposite of the related row.

I was trying to do with ExcelAdvanced, but it took more 17 hours for bot finishing running.

So i am trying to find faster way. 

16 replies

Padmakumar
Premier Pathfinder | Tier 7
Premier Pathfinder | Tier 7
November 28, 2023

Hi @Semih 3318 ,

 

You can use either of the following method in your case for a faster execution.

 

  1. Use the Data Table package.
  2. By using the Database package, connect to the excel file as database. 
 
Padmakumar
Pathfinder Advocate | Tier 6
November 28, 2023

Hello @Padmakumar 

I use excel with two sheets, i get them as data table, lets say dt1 and dt2

I add DataTable:Join action, there is column named Siparis Numarasi, i took it as that, and also tried [Siparis Numarasi], but it gives error..

Padmakumar
Premier Pathfinder | Tier 7
Premier Pathfinder | Tier 7
November 28, 2023

Hello @Padmakumar 

I use excel with two sheets, i get them as data table, lets say dt1 and dt2

I add DataTable:Join action, there is column named Siparis Numarasi, i took it as that, and also tried [Siparis Numarasi], but it gives error..

 

What error you are getting?

 
Padmakumar
Pathfinder Advocate | Tier 6
November 28, 2023

it says Cannot find column with name "[Siparis Numarasi]" in data table. Please check whether the column name is valid. If the problem persists, please contact your System Administrator

When i look inside of the cell its written as Siparis Numarasi , with 1 space

when i copy the header cell its written as Siparis  Numarasi with 2 spaces.

Anyway i tried both, and with brackets, still i get the same  error

Padmakumar
Premier Pathfinder | Tier 7
Premier Pathfinder | Tier 7
November 28, 2023

it says Cannot find column with name "[Siparis Numarasi]" in data table. Please check whether the column name is valid. If the problem persists, please contact your System Administrator

When i look inside of the cell its written as Siparis Numarasi , with 1 space

when i copy the header cell its written as Siparis  Numarasi with 2 spaces.

Anyway i tried both, and with brackets, still i get the same  error

 

Can you rename just that column by removing the Space in between and try? Also, please check what is the first record you are getting while iterating. I seriously doubt that it might have taken the Column headers as the starting row.

 
Padmakumar
Pathfinder Advocate | Tier 6
November 28, 2023

Now it throws error for dt2

Cannot find column with name "[ORDER_ID]" in data table. Please check whether the column name is valid. If the problem persists, please contact your System Administrator

I wrote both ORDER_ID and also with brackets, it gives that error

Padmakumar
Premier Pathfinder | Tier 7
Premier Pathfinder | Tier 7
November 28, 2023

Now it throws error for dt2

Cannot find column with name "[ORDER_ID]" in data table. Please check whether the column name is valid. If the problem persists, please contact your System Administrator

I wrote both ORDER_ID and also with brackets, it gives that error

 

Was the previous error from dt1? Have you tried displaying the first record of the table?

 
Padmakumar
Pathfinder Advocate | Tier 6
November 28, 2023

The first error was with dt1 yes, when i updated the header like SiparisNumarasi, it didnt give error,

but dt2 give error which i tried to join dt1 SiparisNumarasi and dts ORDER_ID

Pathfinder Advocate | Tier 6
November 28, 2023

@Padmakumar since i couldnt get it work, i tried excel as database,

 

SELECT Sheet1.*, Sheet2.* FROM Sheet2 INNER JOIN Sheet1 ON Sheet1.SiparisNumarasi = Sheet2.ORDER_ID AND Sheet1.[Islem Tutari] = Sheet2.TRX_AMOUNT

i get an error

[Microsoft][ODBC Excel Driver] The Microsoft Access database engine could not find the object 'Sheet2'. Make sure the object exists and that you spell its name and the path name correctly. If 'Sheet2' is not a local object, check your network connection or contact the server administrator.

 

Padmakumar
Premier Pathfinder | Tier 7
Premier Pathfinder | Tier 7
November 28, 2023

The first error was with dt1 yes, when i updated the header like SiparisNumarasi, it didnt give error,

but dt2 give error which i tried to join dt1 SiparisNumarasi and dts ORDER_ID

Can you rename it as OrderID and give it a try?

Padmakumar