How can i write at specific location in excel using loop ? let say i want to write at C in ith index so what wil the correct code ? please its urgent
1 次查看(过去 30 天)
显示 更早的评论
clear all;
clc
values = 'P';
i=8; %let say iteration value is 8 in a loop
xlRange = 'Ci:Ci'; %it doesn't work
xlswrite('e:/testSheet.xlsx',values,xlRange);
采纳的回答
Damjan Lasic
2016-12-16
you need a correct way to transform your numeric values to string. like this:
xlRange = ['C',num2str(i),':C',num2str(i)];
or modify to your liking
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!