getting excel variable in a loop
古いコメントを表示
Folder=pwd;
d = dir('bhcf*.xlsx');
N_File=numel(d);
e = actxserver ('Excel.Application');
h=waitbar(0,'Progress...');
for o = 1:N_File
waitbar(o/N_File,h);
ExcelWorkbook = e.workbooks.Open(fullfile(Folder,d(o).name));
there is a column called BHCK5481 in each of these excel files where the sheet is called Sheet1. How can I download it? I tried Sheet=ExcelWorkbook.Sheet1.item('BHCK5481'); but it didn't work Any help is appreciated
3 件のコメント
Sourin Dey
2016 年 6 月 27 日
編集済み: Walter Roberson
2016 年 6 月 29 日
x1=xlsread('ecg.xlsx');
y1=x1(:,1); %here 1 is sheet number 1, it will give you values of first column or sheet number 1.
y2=x1(:,2)
Image Analyst
2016 年 6 月 27 日
I guess you have a "named range" in each workbook and that range is named BHCK5481. Is that correct? And that range might be in any column, not some fixed column like column #3. Is that correct?
wesso Dadoyan
2016 年 6 月 29 日
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Spreadsheets についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!