How to get readcell to read leading empty columns and rows in spreadsheet
48 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Dabeer Ahmad
el 30 de Nov. de 2022
Respondida: Dabeer Ahmad
el 5 de Dic. de 2022
Say I have an Excel file with some entries, offset so that they start at B2 instead of A1 (see image below):
So column A is completely empty, and row 1 is completely empty.
Can I use readcell() so that it includes the empty leading columns and rows? I want to do this without specifying a full range (i.e., 'A1:J50') because I don't know how large my data is. I want MATLAB to find that out for me. If I do readcell(file,'Range','A1'), then it omits the leading row because it's empty, which is the issue I'm facing.
0 comentarios
Respuesta aceptada
Más respuestas (1)
Arif Hoq
el 30 de Nov. de 2022
please refer to this answer:
https://www.mathworks.com/matlabcentral/answers/90811-how-to-import-excel-file-including-empty-cells
You don't need to specify the range. readtable, readcell, readmatrix functions can export all your data from excel.
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!