2018 release: Slow xlsread
7 次查看(过去 30 天)
显示 更早的评论
It seems that the xlsread function has slowed down considerably in the 2018 releases of MATLAB. Is this a known issue? Are there plans to improve it?
3 个评论
Jan
2019-1-15
编辑:Jan
2019-1-15
The public forum has no knowledge about what MathWorks plans to modify in the future. Did you contact them already directly?
If the relative time of import and computing has changed, maybe R2018b computes much faster, while xlsread stayed at the same speed. Please clarify te details. Run some tests with importing the files under te different releases. An impression about the "relative speeds" of processing a data import does not allow to draw unique clues aboud the absolute times.
回答(3 个)
Guillaume
2019-1-15
I'm just curious is something was changed internal to the xlsread function
It's not something that can be answered by us. We're generally not told about what goes on internally at Mathworks and even if we were it would most likely be covered by a non-disclosure agreement. As Jan said, for this sort of questions you're better off asking Mathworks support directly.
I note that you use the 'basic' mode of xlsread. This mode uses an internal parser developed by mathworks (I assume), it does not rely at all on Excel to obtain the data (so whether MSoffice is installed doesn't actually matter). It's very much possible that Mathworks have made some change to that parser (probably to make it more reliable which maybe would make it slower) particularly as it looks like it will become the default mode for readtable in a future release. See the release notes about functionality change of UseExcel. But again, that's all conjecture, contact Mathworks to know for sure.
0 个评论
Jeremy Hughes
2019-1-15
Is this happening with all files?
You should contact MathWorks support and include an example file for which reading has slowed down.
Also, do try READTABLE with the UseExcel=false setting. For many files, this is much faster as it doesn't launch the excel process.
0 个评论
Ryan Jones
2019-10-7
I'm not sure why it may of slowed down, but I can say that for me it was much faster to use readtable with opts. In my case I was only reading a single cell located in the same place in many sheets.
opts = spreadsheetImportOptions('Sheet',1,'DataRange','B3:B3');%I put opts outside of my for loop
a = readtable(filetoread(i),opts,'useexcel',false);
myCellArray{i}= a.Var1{1}
vs
[~,~,tempCellArray] = xlsread(filetoread(i),1,'b3:b3','basic');
I did the above operations on 131 Files. readtable took 124s and xlsread took 716s
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!