http://www.mathworks.com/matlabcentral/newsreader/view_thread/239302
MATLAB Central Newsreader  xlsread error (mac): "unexpected record length"
Feed for thread: xlsread error (mac): "unexpected record length"
enus
©19942015 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Sat, 15 Nov 2008 22:55:05 +0000
xlsread error (mac): "unexpected record length"
http://www.mathworks.com/matlabcentral/newsreader/view_thread/239302#611102
Eric
Hi there. <br>
I recently just switched to a Mac and am encountering some new problems. xlsread is giving me the error:<br>
"File contains unexpected record length. Try saving as Excel 98."<br>
<br>
The files are actually excel 9704 so that shouldn't be the problem. I also have successfully read in some of the excel files. I have meteorological data from 20 sites and the spreadsheets are essentially identical but most of them give me this error. <br>
<br>
I've tried resaving the xls files, copying and pasting into a new file and copying a smaller portion of the file into a new file. None of the above worked and these were suggestions I got when searching other forums.<br>
<br>
I did notice that regardless of the files being identical (same fields and rows just different values) the file size varies greatly. I'm wondering if the files may be corrupt in some way? even though I can open them and everything seems to be there/ nothing missing. <br>
<br>
Any help would be greatly appreciated <br>
<br>
Thanks<br>
<br>
eric

Sat, 08 Aug 2009 22:14:02 +0000
Re: xlsread error (mac): "unexpected record length"
http://www.mathworks.com/matlabcentral/newsreader/view_thread/239302#671677
jawadkcl
Hi,<br>
Did you find a solution to this? I've recently installed matlab & am getting exactly the same problem. Ican't seem to get an excel spreadsheet to load. It was fine on a colleague's PC.<br>
<br>
Jawad<br>
<br>
"Eric " <ecwhite@ucalgary.ca> wrote in message <gfnk09$bbi$1@fred.mathworks.com>...<br>
> Hi there. <br>
> I recently just switched to a Mac and am encountering some new problems. xlsread is giving me the error:<br>
> "File contains unexpected record length. Try saving as Excel 98."<br>
> <br>
> The files are actually excel 9704 so that shouldn't be the problem. I also have successfully read in some of the excel files. I have meteorological data from 20 sites and the spreadsheets are essentially identical but most of them give me this error. <br>
> <br>
> I've tried resaving the xls files, copying and pasting into a new file and copying a smaller portion of the file into a new file. None of the above worked and these were suggestions I got when searching other forums.<br>
> <br>
> I did notice that regardless of the files being identical (same fields and rows just different values) the file size varies greatly. I'm wondering if the files may be corrupt in some way? even though I can open them and everything seems to be there/ nothing missing. <br>
> <br>
> Any help would be greatly appreciated <br>
> <br>
> Thanks<br>
> <br>
> eric

Tue, 23 Apr 2013 21:03:18 +0000
Re: xlsread error (mac): "unexpected record length"
http://www.mathworks.com/matlabcentral/newsreader/view_thread/239302#903035
oscaro@shaw.ca
Did you ever find a solution? I am having the same problem, one file it works for and an essentially identical file (from the same template, saved with slightly different numbers on a different date).<br>
<br>
Joel K<br>
<br>
<br>
<br>
On Saturday, November 15, 2008 2:55:05 PM UTC8, Eric wrote:<br>
> Hi there. <br>
> I recently just switched to a Mac and am encountering some new problems. xlsread is giving me the error:<br>
> "File contains unexpected record length. Try saving as Excel 98."

Wed, 24 Apr 2013 04:50:10 +0000
Re: xlsread error (mac): "unexpected record length"
http://www.mathworks.com/matlabcentral/newsreader/view_thread/239302#903058
Marc
oscaro@shaw.ca wrote in message <388cc077d0034ecbae1fb308eb8b5379@googlegroups.com>...<br>
> Did you ever find a solution? I am having the same problem, one file it works for and an essentially identical file (from the same template, saved with slightly different numbers on a different date).<br>
> <br>
> Joel K<br>
> <br>
> <br>
> <br>
> On Saturday, November 15, 2008 2:55:05 PM UTC8, Eric wrote:<br>
> > Hi there. <br>
> > I recently just switched to a Mac and am encountering some new problems. xlsread is giving me the error:<br>
> > "File contains unexpected record length. Try saving as Excel 98."<br>
<br>
What version of Matlab and excel are you using on Mac? Any relevant code that produces this error.<br>
<br>
Many things have changed since 2008/2009. The most recent Matlab version with Office 2011 for Mac seem to give reproducible results as long as the excel file is saved as xlsx or xlsm extension. <br>
<br>
Way back when, on a PC, I got some weird results with xlsread due to an excel add on my company pushed on a new computer. So, if you have any macros or add ons in your excel files, this may throw Matlab off.