Excelファイルに書き込まれた列の数を取得するためのMatlabのコマンドはありますか?
これは私の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;
ありがとうございました :]
回答:
回答№1は2何について:
[num, txt, raw] = xlsread("example2.xlsx");
intCol = size(raw, 2);