Spreadsheet (.xls) not fully loading

6 views (last 30 days)
John on 7 Aug 2014
Edited: Kelly Kearney on 7 Aug 2014
I'm importing a spreadsheet using
[data header] = xlsread(filename);
, but only the first 438 rows (13 elements/row) is imported. The file is 1500 rows long. Why isn't the entire file imported? What's imported is only 438*13*8 = 45kb, so clearly it's not a memory limitation...or is it? I'm running Ubuntu 12.04 64-bit, matlab 2014a, so the 'memory' command doesn't work.
Star Strider
Star Strider on 7 Aug 2014
Can you open it in Excel?
If so, is there anything strange in or after row 438?

Sign in to comment.

Answers (2)

John on 7 Aug 2014
There isn't anything strange in the file, i wrote the lines manually in LibreOffice calc. See attachment.
Kelly Kearney
Kelly Kearney on 7 Aug 2014
I see the same behavior as John; biffparse (the basic xls reader) is returning NaNs at line 440 and fails to read beyond that. Not sure why, since biffparse is a mex file. Matlab 2013a on Mac OS X 10.9.3.
And in reply to the comment below, when not on Windows, reading from text files is always more stable (and usually quicker) than reading from Excel files. If your files are tab-delimited, just use dlmread or textscan.

Sign in to comment.

azizullah khan
azizullah khan on 7 Aug 2014
Save these files as CSV format
and use csvimport it will be better....
Or which type of OP system you are using?
  1 Comment
John on 7 Aug 2014
As mentioned in the original post, Ubuntu 12.04 64-bit, matlab 2014a. How is cvsimport() better than xlsread()? And if the actual raw files are TSV (tab separated) is there a better way to do import them?

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!