- Only reads XLS files.
- Imports the entire active range of the worksheet.
- Requires a string to specify the sheet, and the sheet name is case sensitive.
- Does not support function handle inputs.
I open a file with xlsread with windows version of MATLAB, but I can't open the same file with the linux 64 bit version
2 次查看(过去 30 天)
显示 更早的评论
Dear sir/madame I wrote a.m file that correctly works with a windows version of MATLAB. But when I used this script in LINUX, the program gave the error:
Warning: XLSREAD has limited import functionality on in basic mode. Refer to HELP XLSREAD for more information. > In xlsread at 168 Error using xlsread (line 232) XLSREAD unable to read sheet INPUT. File contains unexpected record length. Try saving as Excel 98.
I tried to save a file as Excel 95, because I didn't find the Excel 98 option. I also tried to wrote the commands: xlsread('MD_Loss1.xls','INPUT','basic') or xlsread('MD_Loss1.xls') but the file.m gave the error message. How can I resolve the problem? Best regards Paolo Ubezio
0 个评论
回答(1 个)
Ora Zyto
2011-11-1
Paolo,
The xlsread command behaves differently on LINUX and Windows, since its full functionality relies on COM communication with Excel, which is only available on Windows OS.
Per the MATLAB documentation, in basic mode, the xlsread function:
To test the portability of your script file.m, you can force xlsread to function in basic mode on Windows as follows: xlsread('MD_Loss1.xls',sheet,'','basic') You could use this setup to troubleshoot any incompatibilities of your Excel file with the basic mode of xlsread.
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!