Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
xlsx

Subject: xlsx

From: Jessica

Date: 6 May, 2013 02:50:09

Message: 1 of 7

I am trying to import a xlsx file into R2010a. However, I get the error:

[A,B,C]=xlsread('04-11-13.xlsx');

File is not in recognized format.

Any suggestions on how to get around this?

Subject: xlsx

From: Nasser M. Abbasi

Date: 6 May, 2013 05:25:28

Message: 2 of 7

On 5/5/2013 9:50 PM, Jessica wrote:
> I am trying to import a xlsx file into R2010a. However, I get the error:
>
> [A,B,C]=xlsread('04-11-13.xlsx');
>
> File is not in recognized format.
>
> Any suggestions on how to get around this?
>

what happens when you type

dir('04-11-13.xlsx')

Subject: xlsx

From: Jessica

Date: 6 May, 2013 11:19:09

Message: 3 of 7

"Nasser M. Abbasi" wrote in message <km7es7$1l0$2@speranza.aioe.org>...
> On 5/5/2013 9:50 PM, Jessica wrote:
> > I am trying to import a xlsx file into R2010a. However, I get the error:
> >
> > [A,B,C]=xlsread('04-11-13.xlsx');
> >
> > File is not in recognized format.
> >
> > Any suggestions on how to get around this?
> >
>
> what happens when you type
>
> dir('04-11-13.xlsx')
>
>

It returns the name of the file:

04-11-13.xlsx

Subject: xlsx

From: Nasser M. Abbasi

Date: 6 May, 2013 11:56:01

Message: 4 of 7

On 5/6/2013 6:19 AM, Jessica wrote:

>> what happens when you type
>>
>> dir('04-11-13.xlsx')
>>
>>
>
> It returns the name of the file:
>
> 04-11-13.xlsx
>

Are you sure the file is a valid excel worksheet file?

Subject: xlsx

From: Steven_Lord

Date: 6 May, 2013 13:52:35

Message: 5 of 7



"Jessica " <jyorzinski@ucdavis.edu> wrote in message
news:km75p0$1l5$1@newscl01ah.mathworks.com...
> I am trying to import a xlsx file into R2010a. However, I get the error:
>
> [A,B,C]=xlsread('04-11-13.xlsx');
>
> File is not in recognized format.
>
> Any suggestions on how to get around this?

The Release Notes for release R2012a include this item:

"The xlsread function now reads data from XLSX files on all platforms,
including support for specifying the range and worksheet number. Previously,
this functionality was available only on Microsoft Windows systems with
Excel software."

If you are trying to read in your xlsx file on a non-Windows system, or on a
Windows system that did not have a version of Microsoft Excel that can read
XLSX files installed, it will not work because your release of MATLAB
predates that functionality.

I can think of three potential solutions:

1) Open the file in a version of Microsoft Excel that supports XLSX files
and save it in the XLS format.
2) Install a version of Microsoft Excel that supports XLSX files on the
machine where you're running MATLAB.
3) Upgrade to release R2012a or later.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Subject: xlsx

From: Jessica

Date: 6 May, 2013 16:28:09

Message: 6 of 7

"Steven_Lord" <slord@mathworks.com> wrote in message <km8cj4$egm$1@newscl01ah.mathworks.com>...
>
>
> "Jessica " <jyorzinski@ucdavis.edu> wrote in message
> news:km75p0$1l5$1@newscl01ah.mathworks.com...
> > I am trying to import a xlsx file into R2010a. However, I get the error:
> >
> > [A,B,C]=xlsread('04-11-13.xlsx');
> >
> > File is not in recognized format.
> >
> > Any suggestions on how to get around this?
>
> The Release Notes for release R2012a include this item:
>
> "The xlsread function now reads data from XLSX files on all platforms,
> including support for specifying the range and worksheet number. Previously,
> this functionality was available only on Microsoft Windows systems with
> Excel software."
>
> If you are trying to read in your xlsx file on a non-Windows system, or on a
> Windows system that did not have a version of Microsoft Excel that can read
> XLSX files installed, it will not work because your release of MATLAB
> predates that functionality.
>
> I can think of three potential solutions:
>
> 1) Open the file in a version of Microsoft Excel that supports XLSX files
> and save it in the XLS format.
> 2) Install a version of Microsoft Excel that supports XLSX files on the
> machine where you're running MATLAB.
> 3) Upgrade to release R2012a or later.
>
> --
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com


I am running the software on a Mac. I can't save as xls because it truncates the file at about 16000 rows. My machine currently has excel and it saves/opens xlsx files. Thus, option 2 seems best except that I already have this setup and the file doesn't open in matlab.

Subject: xlsx

From: Steven_Lord

Date: 6 May, 2013 17:49:50

Message: 7 of 7



"Jessica " <jyorzinski@ucdavis.edu> wrote in message
news:km8lmp$g0l$1@newscl01ah.mathworks.com...
> "Steven_Lord" <slord@mathworks.com> wrote in message
> <km8cj4$egm$1@newscl01ah.mathworks.com>...
>>
>>
>> "Jessica " <jyorzinski@ucdavis.edu> wrote in message
>> news:km75p0$1l5$1@newscl01ah.mathworks.com...
>> > I am trying to import a xlsx file into R2010a. However, I get the
>> > error:
>> >
>> > [A,B,C]=xlsread('04-11-13.xlsx');
>> >
>> > File is not in recognized format.
>> >
>> > Any suggestions on how to get around this?
>>
>> The Release Notes for release R2012a include this item:
>>
>> "The xlsread function now reads data from XLSX files on all platforms,
>> including support for specifying the range and worksheet number.
>> Previously, this functionality was available only on Microsoft Windows
>> systems with Excel software."
>>
>> If you are trying to read in your xlsx file on a non-Windows system, or
>> on a Windows system that did not have a version of Microsoft Excel that
>> can read XLSX files installed, it will not work because your release of
>> MATLAB predates that functionality.
>>
>> I can think of three potential solutions:
>>
>> 1) Open the file in a version of Microsoft Excel that supports XLSX files
>> and save it in the XLS format.
>> 2) Install a version of Microsoft Excel that supports XLSX files on the
>> machine where you're running MATLAB.
>> 3) Upgrade to release R2012a or later.
>>
>> --
>> Steve Lord
>> slord@mathworks.com
>> To contact Technical Support use the Contact Us link on
>> http://www.mathworks.com
>
>
> I am running the software on a Mac. I can't save as xls because it
> truncates the file at about 16000 rows. My machine currently has excel and
> it saves/opens xlsx files. Thus, option 2 seems best except that I already
> have this setup and the file doesn't open in matlab.

If you were running on a Windows machine, option 2 would be viable. [MATLAB
uses COM to connect to Microsoft Excel in that scenario, but Mac doesn't
have COM.]

Because of what you posted, I think your options are:

3) Upgrade to release R2012a or later.
4) Split the file into a number of XLS files with 16000 rows each.
5) Convert to a different file format entirely (CSV, for example.)

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us