Loop through all excel file in a folder to change the spreadsheet name
Show older comments
Hello,
I wanted to ask how do I write a loop command that will do through all excel file in a folder and change their spreadsheet name and delete some unnecessary columns.
Detail: Each xlsx file contains 3 spreadsheets, and I wanted to change the name of all 3 spreadsheet. I also want to delete some columns in each sheet.
Answers (1)
George
on 1 Nov 2021
0 votes
I would recommend that you generate a getAllFiles function for your future use. There are many examples on github and stackoverflow for your reference.
Once you have the file list you can loop through the list and use activeX to modify the excel files
Categories
Find more on ActiveX in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!