cancel
Showing results for 
Search instead for 
Did you mean: 

Parse Excel file with duplicate columns

mohit
New Contributor

Hi All,

I have same column name multiple times in excel file. I want to parse all and load them into database but excel parser throws error of duplicate columns. Please suggest.

Thanks

3 REPLIES 3

igormicev
Contributor

Hi @mohit,
You can read-in the excel file with duplicate columns if you have the un-checked the “Contains headers” in the next “Excel Parser” snap

image

Then with a mapper, you can remove the duplicate column and introduce a row number (snap.in.totalCount) column at the same time, because in the next step you’d want to filter the first row that contains the real Headers, … so ending up with something like this:

image

Example pipeline attached:
IM_remove_duplicate_columns_example_2021_01_05.slp (7.7 KB)

/Igor

mohit
New Contributor

Hi @ igormicev
Thanks for the reply but I don’t want to remove the Duplicate columns. What I want to do is below 🙂
Lets say I have two duplicate columns Address, Address. So I want to take both the columns insert the data into database but with new name like Address and Address1. And I don’t want to do this manually by giving the name individually in mapper.

Can you suggest something.

Thanks
Mohit Yadav

Hi Mohit

Attaching a sample that should help you solve it. community_duplicate_columns_example_2021_01_06.slp (11.7 KB) sampleworkbook.xlsx (8.7 KB)