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 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Enayat Ansari
am 16 Dez. 2016
Kommentiert: Walter Roberson
am 16 Dez. 2016
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);
Akzeptierte Antwort
Damjan Lasic
am 16 Dez. 2016
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
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Spreadsheets finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!