I receive the same data each week that comes with the same names on the excel tabs. I need to first group all the sheets with the same name and do an operation on them before I combine them all together. For example:
Week1.xlsx (workbook)
- Blue (sheet) - has a column named type that just says "Color"
- Red (sheet) - has a column named type that just says "Color"
- Green (sheet)` - has a column named type that just says "Color"
Week2.xlsx (workbook)
- Blue (sheet) - has a column named type that just says "Color"
- Red (sheet) - has a column named type that just says "Color"
- Green (sheet) - has a column named type that just says "Color"
etc.
I need to combine all the common sheets together and modify the type
column to say which color sheet it came from. If I combined them all together, then the type
column will only be populated with "Color", so the name of the sheet is the only piece of information that tells me how to organize it.
Final output: all-data.xlsx
Type
Color - Blue
Color - Red
Color - Blue
Color - Green
.
.
.
I don't necessarily need help with the second part (modifying the columns), I just want to know how to combine all the common sheets together (possibly in a list) that I can them access by name.