I have xlsx file which contains 750,000x33 cells.
When I tried to use:
[FileName PathName] = uigetfile('*.xlsx','XLSX Files');
fid = fopen(FileName);
T=importdata(FileName);
The computation took over an hour.
Is there anything I can do to speed the process?
I also tried to use xlsread but it didnt work aswell.
Thank you.
The fastest way would be:
xlsread
function for reading the data;So, try this:
[file_name, path_name] = uigetfile('*.xlsx','XLSX Files');
[num, txt, ~] = xlsread(fullfile(path_name, file_name));
After this, you will have anything that could be converted to numbers in the numeric matrix num
, and everything else as the string cell array txt
. Check the function's help for further tuning of the data loading.
Later edit: If this is still slow, is most likely because xlsread
is growing arrays in memory in basic mode, and the memory is fragmented, or too small. Options (they are not mutually exclusive):
textscan
to load the data;