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!