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:
xlsread

Subject: xlsread

From: Alasdair

Date: 17 Aug, 2007 16:52:13

Message: 1 of 3

When using xlsread I am only able to read one sheet of
Excel data into Matlab. I can not read another sheet in
later in the session. Any one know a way round this?

Subject: xlsread

From: josep

Date: 17 Aug, 2007 19:07:49

Message: 2 of 3

"Alasdair " <alasdair.macarthur@ed.ac.uk> wrote in message
<fa4jnt$jc$1@fred.mathworks.com>...
> When using xlsread I am only able to read one sheet of
> Excel data into Matlab. I can not read another sheet in
> later in the session. Any one know a way round this?

Hi,

Try...
>>xlsread(file,'sheet2')

or use the name of the sheet

Subject: xlsread

From: Yair Altman

Date: 18 Aug, 2007 18:02:05

Message: 3 of 3

"josep " <joancampoy@hotmail.com> wrote in message

>>xlsread(file,'sheet2')

This works, but is painfully slow if you have several
worksheets you wish to read one after the other. The reason
is that xlsread opens and closes an Excel COM server each
time, and does not reuse an open server connection. There
are a couple of solutions for that on the Matlab File
Exchange - one of them is my OfficeDoc -
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=15192

Yair Altman
http://ymasoftware.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