I have a folder consisting of several excel documents.
For each file in the list I want to go to 3 specific sheets (that are present in each of the files) and copy these sheets into a new workbook.
So the it looks like this
Folder:
File1
Sheet1
Sheet2
...
Sheetn
File2
Sheet1
Sheet2
...
Sheetn
...
Filen
Sheet1
Sheet2
...
Sheetn
The sheet names are not titled like this but all have a similar naming structure so I want to write something like this:
new_file = excel workbook # create a new workbook (not sure the syntax)
for file in folder:
open file
for sheet in file:
if sheetname like 'foobar1' or sheetname like 'foobar2'....:
copy sheet into new_file
save new_file
The problem is I don't know what libraries to use or exactly how to write this properly.
I am not well versed with using python to interact with excel documents.
Any ideas?