In case anyone is interested, I worked out a way (although it's insanely inefficient as you shouldn't plot graphs inside loops but I couldn't find another way) I used: [~,sheets]=xlsfinfo('sheets.xlsx'); then used a for loop going between one and length(sheets), which I used to index the page number on xlsread and plot each graph, turning hold on, then ending so the next sheet can be plotted until the loop finishes.
Make a graph with data from all sheets in excel
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Jamie Shelley
el 21 de Jul. de 2016
Comentada: dpb
el 9 de Mzo. de 2018
Every day I carry out a new experiment, each one corresponds to a seperate sheet on the same excel file. Is there a way of finding the data from each sheet to plot it all on one graph? Thanks
4 comentarios
noname
el 8 de Mzo. de 2018
It gave me an error if I used xlsfinfo. I want to read all the spreadsheet in the same excel file and plot each spreadsheet, not plot them in one graph. Can anyone give an example how to do it? Thanks alot.
dpb
el 9 de Mzo. de 2018
Have to show the code that caused the error...post what you've tried and where ran into a problem.
Respuesta aceptada
dpb
el 21 de Jul. de 2016
Editada: dpb
el 21 de Jul. de 2016
Sure, just use xlsinfo to return the sheet names in the spreadsheet and iterate over that collection. See
doc xlsfinfo
doc xlsread % for details
2 comentarios
dpb
el 21 de Jul. de 2016
"I used xlsfinfo as opposed to xlsinfo"
That was a typo, there is no xlsinfo
Más respuestas (0)
Ver también
Categorías
Más información sobre Spreadsheets en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!