Count worksheets in an excel workbook without using xlsfinfo
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Michael Horn
el 23 de Abr. de 2021
Respondida: Harsh
el 26 de Abr. de 2021
I have excel workbooks with multiple worksheets that I want to read in.
Is there a function besides xlsfinfo that will count the number of worksheets?
I can explain why xlsfinfo doesn't work, if anyone needs to know, but it is beside the point. The short answer is that it returns a character variable if it encounters an issue inspecting the workbook. The same issue creates no problem for readtable. So I can get my data, but I need to find a way of telling my loop how many worksheets to look for.
Thanks
0 comentarios
Respuesta aceptada
Harsh
el 26 de Abr. de 2021
>> sheets = sheetnames('patients.xls')
sheets =
3×1 string array
"Sheet1"
"Sheet2"
"Sheet3"
>> numel(sheets)
ans =
3
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Spreadsheets en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!