Write Cell arrays to excel file using XlWRITE function ?
Show older comments
Dear all, i would like to print a sequence of string data to a certain excel file, by i can not print based on the following code: and why data-name is repeated 5 times in command window ? thanks
n = 5;
for i = 1:n
data-name{i} = {sprintf('day%s',num2str(i))}
end
% Write out the cell array all in one shot and write day1...dayn
xlswrite('D:\name.xls', data-name, 'Sheet1', 'A1');
Accepted Answer
More Answers (1)
KSSV
on 31 Mar 2017
n = 5;
for i = 1:n
data_name{i} = sprintf('day%s',num2str(i)) ;
end
% Write out the cell array all in one shot and write day1...dayn
xlswrite('D:\name.xls', data_name, 'Sheet1', 'A1');
1 Comment
ahmed obaid
on 31 Mar 2017
Categories
Find more on Spreadsheets in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!