How to append data in excel file ? why my program given below is not working ?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi friends, I want to append the data generated by some calculations to the existing excel file. In the program given below, i'm generating ASCII values and converting them to character. But it is not giving the intended result.And it is not giving any error also. Please assist me. Thankq...
______________________________________________________________
a=imread('ct1.jpg');
imshow(a);
n=4
[x y]=ginput(n);
num=65;
for i=1:n
b=a;
c=imcrop(b,[x(i) y(i) 30 30]);
figure,imshow(c);
d=sum(sum(c));
d=d'
%imwrite(a,'sample.tif');
%fname=strcat('A',num2str(i))
num=num+1
s = xlswrite('sample.xls', d,1,'char(num)');
end
_______________________________________________________________
댓글 수: 0
답변 (1개)
Desiree
2011년 8월 25일
Function CHAR will not help in calculating the Excel ranges as those are in the A1 notation. You can find user-contributed utilities in MATLAB Centrals File Exchange though which can manage the conversion of numbers to the Excel range notation for you, f.ex.:
댓글 수: 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!