From: Venna on
Hi frnds,

Iam trying to write a Array of strings of the size nearly {5000X2}
using XLSWRITE but it giving an error message. So i tried writing a single String at a time then it is successful. so i wrote a for loop for each string but it is taking a lot of time to complete this task(2 hours).

MY CODE:

for i = 1:length(array)
StringA = strcat('A',num2str(i));
StringB = strcat('B',num2str(i));
xlswrite('book1.xls',array(i,1),'Sheet1',StringA);
xlswrite('book1.xls',array(i,2),'Sheet1',StringB);
end
From: Oleg Komarov on
"Venna " <vennasivaram(a)gmail.com> wrote in message <i2lrqt$9b4$1(a)fred.mathworks.com>...
> Hi frnds,
>
> Iam trying to write a Array of strings of the size nearly {5000X2}
> using XLSWRITE but it giving an error message. So i tried writing a single String at a time then it is successful. so i wrote a for loop for each string but it is taking a lot of time to complete this task(2 hours).
>
> MY CODE:
>
> for i = 1:length(array)
> StringA = strcat('A',num2str(i));
> StringB = strcat('B',num2str(i));
> xlswrite('book1.xls',array(i,1),'Sheet1',StringA);
> xlswrite('book1.xls',array(i,2),'Sheet1',StringB);
> end

a = {'hi', 'how are u'};
xlswrite('file.xlsx', a)

Oleg