xlread is too slow
2 ビュー (過去 30 日間)
古いコメントを表示
x55 = xlsread('E:\OneDrive\Documents\Abilash\Academic\UCB\CBE 154\04 Centrifugal Pump\CP Data.xlsx','Sheet1','G2:G10');
y55 = xlsread('E:\OneDrive\Documents\Abilash\Academic\UCB\CBE 154\04 Centrifugal Pump\CP Data.xlsx','Sheet1','M2:M10');
x50 = xlsread('E:\OneDrive\Documents\Abilash\Academic\UCB\CBE 154\04 Centrifugal Pump\CP Data.xlsx','Sheet1','G11:G18');
y50 = xlsread('E:\OneDrive\Documents\Abilash\Academic\UCB\CBE 154\04 Centrifugal Pump\CP Data.xlsx','Sheet1','M11:M18');
x40 = xlsread('E:\OneDrive\Documents\Abilash\Academic\UCB\CBE 154\04 Centrifugal Pump\CP Data.xlsx','Sheet1','G19:G26');
y40 = xlsread('E:\OneDrive\Documents\Abilash\Academic\UCB\CBE 154\04 Centrifugal Pump\CP Data.xlsx','Sheet1','M19:M26');
x30 = xlsread('E:\OneDrive\Documents\Abilash\Academic\UCB\CBE 154\04 Centrifugal Pump\CP Data.xlsx','Sheet1','G27:G30');
y30 = xlsread('E:\OneDrive\Documents\Abilash\Academic\UCB\CBE 154\04 Centrifugal Pump\CP Data.xlsx','Sheet1','M27:M30');
Hi
I have a xlsread code like the one shown above. It is an excel sheet of about 2mb size with data from A1 to about AA100. The code takes forever to run and read the data. How do i speed it up and solve this is issue
0 件のコメント
回答 (3 件)
Walter Roberson
2016 年 10 月 18 日
If you are using R2016b or later then you might not be able to do any better.
If you are using R2016a or previous, and you are using MS Windows with Excel installed, then get the File Exchange contribution xlsread1()
0 件のコメント
Image Analyst
2016 年 10 月 19 日
It was R2015b where they first changed how the Excel functions worked. With that version and later, Excel is launched but not shutdown. it stays in the background which makes subsequent calls to xlsread() or xlswrite() faster. They made more speedups in subsequent versions.
You might also try readtable(). That's been speeded up too. So, basically, make sure you have the latest version.
Of course you can program it yourself in ActiveX if you want (like I do).
0 件のコメント
Steven Lord
2016 年 10 月 19 日
Your file is located in OneDrive? Try moving the file to your local hard drive and see if that improves performance.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Spreadsheets についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!