How do I read in the data from 23 sheets/tabs (of excel file) and create field (within a structure) that contains each tab's data?
Mostrar comentarios más antiguos
Hi all, I have an excel file with 23 sheets/tabs. I want to read the data from each sheet/tab and assign the data into separate fields (within a structure) for each sheet/tab. Is this possible? Can I do it using a loop, instead of individually? Thank you
3 comentarios
Hermes Suen
el 5 de Jul. de 2018
Does it need to be in a struct, or could you import into a table? What does the data look like? If it it is organized by columns you can consider using a Table which would be easier. If it is a table, then you can create a cell array of the numbers 1-23, and use a loop (happy to show you some example code if it is). Do you want the data from each sheet to go into a specific field in a larger Struct, or does EACH sheet have its OWN struct?
Mathew Grey
el 6 de Jul. de 2018
Editada: per isakson
el 6 de Jul. de 2018
Image Analyst
el 7 de Jul. de 2018
I can't seem to find where you attached the workbook. What question or comment did you attach it to?
Respuesta aceptada
Más respuestas (1)
Mathew Grey
el 8 de Jul. de 2018
0 votos
Categorías
Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!