Read 2 specific columns in excel file
Mostrar comentarios más antiguos
Hi, I am quite new to Matlab and have a question about reading specific columnws from excel files. I am interested in column A and G. There is data in the other columns but I am not interested in it. The code follows:
ImportedData{fol_no,file_no} = readtable(char(fullfile(fileInfo(1).folder,fileNames(file_no))));
el=table2array(ImportedData{fol_no,file_no}(:,1,:,7));
I get a message consisting of: You cannot subscript a table using linear indexing (one subscript) or multidimensional indexing (three or more subscripts). Use a row subscript and a variable subscript.
I can import one of the columns, either A or G, but not both simultaneously. I guess the problem is connected to "table2array" as the array only deals with one column?
So my question to you is- how can I import the columns simultenously? Pleaste note that I am performing this procedure for a no.of files
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Data Import from MATLAB 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!