Loop through all excel file in a folder to change the spreadsheet name

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.

Respuestas (1)

George
George el 1 de Nov. de 2021
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

Productos

Versión

R2021a

Etiquetas

Preguntada:

el 1 de Nov. de 2021

Respondida:

el 1 de Nov. de 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by