What is the difference between the "xlsread" and "readtable" functions?

I am using "xlsread" in my script and am running into the following warning:
Warning: Could not start Excel server for import, 'basic' mode will be used. Refer to HELP XLSREAD for more information.
Later on in my script, I am using the data imported from Excel and notice that the data read in is incorrect. How can I get Excel to not launch in "basic" mode?

 Accepted Answer

To avoid running into this warning, the best solution is to upgrade to using readtable, readcell, or readmatrix based on the desired workflow.
The reason for this recommendation is because "xlsread" uses ActiveX to communicate with Excel and requires that Excel be running. Microsoft doesn't recommend using this approach for working in production environments. This is a limitation from Microsoft and if "xlsread" must be used, then you can reach out to Microsoft to help with resolving this issue.
The three read functions by default do not use a running Excel process, but reads the data directly from the file. This does limit some of the functionality for working with Excel files. Macros, executing formulae, and certain formatting features are unavailable unless the Excel process running. However, this is the recommended approach to access data, especially in production environments.

More Answers (0)

Products

Release

R2019a

Community Treasure Hunt

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

Start Hunting!