I can import data from an excel file with 58 sheets. Each sheet has a different number of rows.
%Gives sheet names and rows with data
[~,sheet_name]=xlsfinfo('Teco.xlsx'); for k=1:numel(sheet_name); data{k}=xlsread('Teco.xlsx',sheet_name{k}); end %Import data from specific sheet and only show rows with data
for i=4:58; [~,~,raw]=xlsread('Teco.xlsx',sheet_name{i},'B:C'); raw(any(cellfun(@(x) any(isnan(x)),raw),2),:) = []; end
The cell array "sheet_name" gives the name of each sheet and the cell array "raw" gives the data from each sheet.
I want to rename the cell array "raw" using the contents of the "sheet_name" so that the data is not written over within each loop.
Best Answer