What format of data files is adequate to reduce the processing time?

I wrote a script that reads data from excel. When I execute this m-file and analyze the profile of result. It takes most of the processing time in the function 'xlsread'. Should I change the format of files? or 'actxserver' is unrelated with xlsread?

 Accepted Answer

The ActiveX framework allows applications to access and control Microsoft applications. Basically if you want to use Excel files, then the ActiveX framework is/was the usual way to access them, and the actxserver is the process that achieves this (on Windows OS, anyway).
If speed is your main concern then avoid using proprietary Excel files, and use simple text files or mat files:

2 Comments

Or binary files. Using memorymap() can be very effective for structured binary files.
Also, if you have xlsread() in a loop, then you should look at xlsread1() in the File Exchange.
Mathworks apparently improved the performance of xlsread() in a loop as of R2015b; before that, the xlsread1() file contribution was a practical necessity if you had a number of files to read.
Thanks for answer. I'll try to change the format of data files as you answer for my question

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!