1

I have an excel-file which consists of about roughly 10,000 rows and has a size of around 800KB

When I try to import the data to MATLAB both with GUI import tool, or using XLSREAD I get the following message:

Could not open the spreadsheet. MATLAB reported the following error:
XLSREAD unable to read sheet "Sheet1"
File contains unexpected record length. Try saving as Excel 98

I tried saving as excel 98, but didn't help?...funny thing is, I can import other excel-files which are bigger than 10,000 rows and 800KB in size?!...

Ideas? =) My excel-file shouldn't consist anything special, just columns of numeric data with headers consisting of text...

NOTE:

It seems this only comes when I use MATLAB in Ubuntu 12.10...When I tried it in Windows XP it works just fine....??

UPDATE:

XLSREAD in UBUNTU just doesn't seem to like big excel files...If I reduce the number of rows...voila...=(

UPDATE2:

The limit value of rows seems to be 746 rows. If I have 746 rows in file, reading is okay, if I have > 746, no game...

6
  • Does this occur for every similar excel file or just 1 specific case? Furthermore, if the sheet just contains data, it may help to copy and paste values into a new excel file. Dec 21, 2012 at 10:38
  • Yes I tried similar files and it does the same thing...If I delete a lot of rows (Like from 8000 to 300) from my file Matlab can read it...but this is unacceptable =)
    – jjepsuomi
    Dec 21, 2012 at 10:42
  • use R :) no that's a joke... do you know what unexpected record length means?
    – don.joey
    Dec 21, 2012 at 10:42
  • Okay I will try copy and paste right away. Thank you!
    – jjepsuomi
    Dec 21, 2012 at 10:42
  • Hah =D No unfortunately...I'm new with Matlab =)
    – jjepsuomi
    Dec 21, 2012 at 10:43

1 Answer 1

0

For completeness:

As mentioned above Ubuntu does not appear to enable XLSREAD with big files.

The solution would then be to cut your file into smaller pieces (start with half, then half of half etc) untill you can use XLSREAD and afterwards combine the results.

An untested solution that may also work: Try saving it as csv and import it like that or use low level fileread commands.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .