From: Tassie on
I have a for-loop in my code that is generating data each time it goes through the loop. I would like for each piece of data to write automatically to an Excel file, however, in using XLSWrite the data keeps rewriting over cell A1. Can anyone help me with some code that can do what I need?

Thanks!
Tassie
From: us on
"Tassie " <njh159(a)psu.edu> wrote in message <hoo9pu$ms$1(a)fred.mathworks.com>...
> I have a for-loop in my code that is generating data each time it goes through the loop. I would like for each piece of data to write automatically to an Excel file, however, in using XLSWrite the data keeps rewriting over cell A1. Can anyone help me with some code that can do what I need?
>
> Thanks!
> Tassie

a hint:
- it's not wise to use XLSWRITE in a loop as it is very time consuming...
- rather, fill a pre-allocated CELL with your data, then write it in one shot...
- otherwise, look at the RANGE option in

help xlswrite;

us