是否有Matlab命令来获取excel文件中写入的cols数?
这是我的excel文件:
这是我的代码:
e = actxserver ('Excel.Application'); %# open Activex server
filename = fullfile(pwd,'example2.xlsx'); %# full path required
ewb = e.Workbooks.Open(filename); %# open the file
esh = ewb.ActiveSheet;
我试过了:
intCol = Range('IV1').End(xlLeft).Col;
谢谢:]
答案 0 :(得分:2)
怎么样:
[num, txt, raw] = xlsread('example2.xlsx');
intCol = size(raw, 2);