MATLAB: Problem to import data from Excel to Matlab

32-bit64-bitcomdllimporting excel data

Hello, I've a problem to import data from excel file to Matlab. I'm using xlsread function in the following way:
then I receive this warning message:
"Warning: XLS File contains unrecognized string header – skipping remaining text – (1027:0x20 57307)"
and the 'text' matrix result truncate. I've tried to copy and paste the data in an other xls file, but the problem persist. My xls file is approximately 20MB.
Is it too large? Could anyone help me?
Thank you

Best Answer

  • On Windows machine, MATLAB opens Excel as a COM server to read data from Excel files. On other platforms, xlsread operates in what is called a 'basic' mode, which doesn't support some file formats. From the warning message that you receive: "Range cannot be used in 'basic' mode. The entire sheet will be loaded.", it seems that MATLAB is somehow unable to start-up Excel as a COM server. So the best path of resolution to your issue is to first resolve any errors occurring while starting Excel as a COM server.
    Try executing the following command to see if you receive an error:
    e = actxserver('Excel.Application')