How to append data in excel file ? why my program given below is not working ?

1 visualización (últimos 30 días)
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
_______________________________________________________________

Respuestas (1)

Desiree
Desiree el 25 de Ag. de 2011
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.:

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by