0

I have different excel spreadsheets that contain tables with the same structure and the same header. I need to conserve the header in the first spreadsheet and copy the tables of the other spreadsheets one beside the other in the first one, without repeating the header every time. I have 150 or more spreadsheets, it takes a long time to do it by hand. How can I solve this problem with a programming language like Python, C# or excel VBA? I saw similar questions but I didn't manage to solve this problem with the answers given to those questions.

  1. Question 1
  2. Question 2

1 Answer 1

0

I would probably automate the process using whichever programming language you are most comfortable with that also has a pre-made Excel package. For instance, in C#, I used to use EPPlus.

Essentially you would write code that opens the existing first spreadsheet for writing, opens the other spreadsheets one by one and reads the table content starting from row 2, and copies the data into your master one. Rinse and repeat.

I would even clone the original spreadsheet and rename it to something else while you are testing this so that you don't accidentally clobber anything.

Not the answer you're looking for? Browse other questions tagged or ask your own question.