matlab使用xlsread函数读取excel表格(xls格式)出错 具体情况如下:求原因求解答 在线等
[~, ~, sf] = xlsread('D:\\keyan.xls','keyan','A2:A32');
[~, ~, raw] = xlsread('D:\keyan.xls','keyan','B2:H32');
x= cell2mat(raw);
Warning: Could not start Excel server for import, 'basic' mode will be used. Refer to HELP XLSREAD for more information.
> In xlsread at 174
Warning: Range cannot be used in 'basic' mode. The entire sheet will be loaded.
> In xlsread at 181
Error using xlsread (line 232)
XLSREAD unable to read sheet keyan.
File contains unexpected record length. Try saving as Excel 98.
补充:代码第一行多打了一个斜杠... 请忽略。 不是地址的问题,为何提示函数不能用。。。
答案:你中括号里的sf和raw是什么东东 可以先把数据读进去就ok 比如说
sf= xlsread('D:\\keyan.xls','keyan','A2:A32');
数组sf里就存放了表kenan sheet柯南 里的A2:A32的数据
上一个:matlab分段函数绘图问题
下一个:有谁帮我写下测试函数shaffer 的matlab的程序,我自己写了不对。做粒子群优化算法测试用的。