XLSREAD() Bug(?) -- Fails to return empty columns in xlRegion
1 view (last 30 days)
Show older comments
Just discovered a nasty apparent bug in xlsread -- column of data is something like
M012345 NAME FUND empty empty VAL1 VAL2 ... empty empty VAL1 VAL2
'empty' above stands for a cell which hasn't values at present but represents a previous year that might at some time be included in an analysis but for which, at present, the effort to go back and retrieve same hasn't been undertaken. There are two sets of values over the same sets of years illustrated above.
The statement
[V,ID]=xlsread('filename.xls','SheetName','A3:AF46');
turns out to return
size(ID) ==> 44,2 % OK
size(V) ==> 44,27 % WRONG!!!!!
It appears that xlsread smushes together the empty columns into a single one and therefore, the selection of the area and the association with the years implied by the location in the sheet by column is lost.
This occurs as written in an m-function and also if one uses the "-1" option and interactively selects the area.
Anybody else confirm this behavior and it seems to me it's a definite bug as it surely isn't documented and it screwed an analysis up royally that I didn't discover from months ago until just now when returned to the scene to make some modifications.
3 Comments
Image Analyst
on 11 May 2015
You forgot to attach the workbook so people can try it for themselves. If you're going to make such a bold claim as a bug then you should back it up with something that conclusively demonstrates it.
Answers (0)
See Also
Categories
Find more on Data Import from MATLAB in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!