MATLAB: Reading multiple cells after merged cell from excel sheet

actxservercomexcelmerged cells

Cells A1 and B1 are merged. Now when I read Cells A1 and B1 with Excel COM Application, they read 'Waste Accumulation'and 'NaN' and The immediate cell going down after merged cell is just A2 . Is there a method with which I can read both the cells A2 and B2 after read merged cell? I would like to read column after cells A2 and B2 separately.

Best Answer

I'm still not exactly clear what your question is. If you're trying to find the cells that are part of the merge I've already shown how to do that in my comment:
%...
sheet = workbook.Worksheets.Item(sheetname{1});
start_range = sheet.Cells.Find(string_item{1}); %no need to get the address
end_range = start_range.End('xlDown');
numcolumns = start_range.MergeArea.Columns.Count; %if you want to know how many columns are merged
After that I'm not sure what you want to do.