If you need to read one or mode columns of numeric data from a large Excel file, this will do it faster, and use less memory, than xlsread. Reads the same rows from all columns and returns an array. Non-numeric entries return NaNs. The columns need not be consecutive, and can be specified by letter code or number.
Are Mjaavatten (2021). read_excel_columns(filename,sheet,columns,firstrow,lastrow) (https://www.mathworks.com/matlabcentral/fileexchange/55984-read_excel_columns-filename-sheet-columns-firstrow-lastrow), MATLAB Central File Exchange. Retrieved .
Maen Hawamdeh: II don't know why you get this error. Maybe my code does not work with newer versions of Matlab or Excel? I cannot test this, as I use R1014b and Office 2010. Which error message do you get?
hello, thank you for this code, but i have this error:
Error in read_excel_columns (line 55)
hWorkbook.Close(false); % Close without saving
This is faster than readtable() too ! Thanks :)
Inspired: joukowski airfoil
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!