Got Questions? Get Answers.
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:
Large dataset xlsread limitations mac

Subject: Large dataset xlsread limitations mac

From: Dave

Date: 19 Jun, 2013 12:03:07

Message: 1 of 4

Hi,

I have very large .csv files (approx 500,000 rows) that I want to read into excel. They contain a mixture of number and text content.

For smaller files I have been saving the csv as xls format which is fine, but can only handle approx 65,000 rows. Not an option for these larger files.

I don't think xlsread will work with xlsx extension (which can handle all the data)?

So, any suggestions? Working on mac btw if that changes things!

Subject: Large dataset xlsread limitations mac

From: Steven_Lord

Date: 19 Jun, 2013 13:58:37

Message: 2 of 4



"Dave " <davidsheeran@gmail.com> wrote in message
news:kps6lr$2gg$1@newscl01ah.mathworks.com...
> Hi,
>
> I have very large .csv files (approx 500,000 rows) that I want to read
> into excel. They contain a mixture of number and text content.

So if you want to read the files into Microsoft Excel ... how is MATLAB
involved?

> For smaller files I have been saving the csv as xls format which is fine,
> but can only handle approx 65,000 rows. Not an option for these larger
> files.
>
> I don't think xlsread will work with xlsx extension (which can handle all
> the data)?

As of release R2012b, XLSREAD can work with XLSX files.

http://www.mathworks.com/help/matlab/release-notes.html

"The xlsread function now reads data from XLSM, XLTX, and XLTM files on all
platforms. Previously, this functionality was available only on Microsoft
Windows systems with Excel software."

But I'm not sure that helps you, since you wanted to "read into excel" which
I suspect means you want to WRITE them to an Excel file. The _XLSWRITE_
function does not support writing to XLSX files unless you're on a Windows
machine with a version of Microsoft Excel that can write those files
installed and accessible via COM.

http://www.mathworks.com/help/matlab/ref/xlswrite.html

"If your system does not have Excel for Windows, or if the COM server (part
of the typical installation of Excel) is unavailable, then the xlswrite
function:

    Writes array A to a text file in comma-separated value (CSV) format."

> So, any suggestions? Working on mac btw if that changes things!

Obtain a version of Microsoft Excel for Mac that supports the XLSX file
format and use that to read the CSV file and save to XLSX. For example,
Excel 2011 supports XLSX and allows up to 2^20 rows, which is sufficient for
the files with about 500k rows.

http://office.microsoft.com/en-us/mac-excel-help/specifications-and-limits-for-excel-2011-HA102928032.aspx?CTT=1

Alternately, just operate with the CSV files directly. You haven't indicated
why converting to an Excel file format is necessary.

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

Subject: Large dataset xlsread limitations mac

From: kees de Kapper

Date: 5 Jul, 2013 10:37:09

Message: 3 of 4

Although I did not start the thread, thanks for the extensive reply.
I noticed that you are writing about "release 2012b". Does that explicitly mean that previous versions (2012a as well) cannot handle this?
I'm using Matlab 2012a with xlsx and did experience problems to read xlsx files with cells containing more than 255 characters. Do I have to update my Matlab to work with this?

"Steven_Lord" <slord@mathworks.com> wrote in message <kpsdee$les$1@newscl01ah.mathworks.com>...
>
>
> "Dave " <davidsheeran@gmail.com> wrote in message
> news:kps6lr$2gg$1@newscl01ah.mathworks.com...
> > Hi,
> >
> > I have very large .csv files (approx 500,000 rows) that I want to read
> > into excel. They contain a mixture of number and text content.
>
> So if you want to read the files into Microsoft Excel ... how is MATLAB
> involved?
>
> > For smaller files I have been saving the csv as xls format which is fine,
> > but can only handle approx 65,000 rows. Not an option for these larger
> > files.
> >
> > I don't think xlsread will work with xlsx extension (which can handle all
> > the data)?
>
> As of release R2012b, XLSREAD can work with XLSX files.
>
> http://www.mathworks.com/help/matlab/release-notes.html
>
> "The xlsread function now reads data from XLSM, XLTX, and XLTM files on all
> platforms. Previously, this functionality was available only on Microsoft
> Windows systems with Excel software."
>
> But I'm not sure that helps you, since you wanted to "read into excel" which
> I suspect means you want to WRITE them to an Excel file. The _XLSWRITE_
> function does not support writing to XLSX files unless you're on a Windows
> machine with a version of Microsoft Excel that can write those files
> installed and accessible via COM.
>
> http://www.mathworks.com/help/matlab/ref/xlswrite.html
>
> "If your system does not have Excel for Windows, or if the COM server (part
> of the typical installation of Excel) is unavailable, then the xlswrite
> function:
>
> Writes array A to a text file in comma-separated value (CSV) format."
>
> > So, any suggestions? Working on mac btw if that changes things!
>
> Obtain a version of Microsoft Excel for Mac that supports the XLSX file
> format and use that to read the CSV file and save to XLSX. For example,
> Excel 2011 supports XLSX and allows up to 2^20 rows, which is sufficient for
> the files with about 500k rows.
>
> http://office.microsoft.com/en-us/mac-excel-help/specifications-and-limits-for-excel-2011-HA102928032.aspx?CTT=1
>
> Alternately, just operate with the CSV files directly. You haven't indicated
> why converting to an Excel file format is necessary.
>
> --
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com

Subject: Large dataset xlsread limitations mac

From: Steven_Lord

Date: 8 Jul, 2013 18:24:10

Message: 4 of 4



"kees de Kapper" <kees_de_kapper@hotmail.com> wrote in message
news:kr67kl$lgr$1@newscl01ah.mathworks.com...
> Although I did not start the thread, thanks for the extensive reply. I
> noticed that you are writing about "release 2012b". Does that explicitly
> mean that previous versions (2012a as well) cannot handle this?

According to the Release Notes, I would say no.

> I'm using Matlab 2012a with xlsx and did experience problems to read xlsx
> files with cells containing more than 255 characters. Do I have to update
> my Matlab to work with this?

I'm not certain, though when I searched Google I did find plenty of hits for
"Excel 255 characters" that suggests it's related to older Excel file
formats. My _guess_ is that it's related to the 'basic' reading mode and so
updating to a newer version of MATLAB may work; if you want to be certain, I
recommend contacting Technical Support.

*snip*

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

Tags for 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