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:
Writting multiple sets of data to multiple excell cells

Subject: Writting multiple sets of data to multiple excell cells

From: Martin Rose

Date: 26 Mar, 2009 17:59:02

Message: 1 of 3

Hi I wondered if any could help with a little problem I have.

I would like to write multiple arrays to excell which isnt a problem however after each iteration i want to change the cells that excel writs to so as not to over write the data.

a simplified version of what im trying to do is below.
x=magic(2);
y=magic(3);

for n = 1:3
   x=x*y;
   xlswrite('test_data', x , 1, 'A1')
end

however I want to increase A1 by 3 each iteration to read A4 A7 respectively.

Any help any one could provide would be much appreciated

Thank you

Subject: Writting multiple sets of data to multiple excell cells

From: Caroline From France

Date: 26 Mar, 2009 19:34:01

Message: 2 of 3

Hi,

Something like that :
x=magic(2);
y=magic(3);

for n = 1:3
   x=x*y;
   xlswrite('test_data', x , 1, sprintf('A%d',1+3*(n-1))
end

Caroline

Subject: Writting multiple sets of data to multiple excell cells

From: Yair Altman

Date: 26 Mar, 2009 19:41:01

Message: 3 of 3

You can try OfficeDoc - http://www.mathworks.com/matlabcentral/fileexchange/15192 - it has an 'append' mode, so you don't need to worry about placing your data in the specific cell beneath your last data write.

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