writecell produces two cells when Range is a sigle cell

I am writing a since cell varialbe to an excel spreadsheet and the desired range changes each time. I decode the range as a selected Column (i.e., ‘AX’) concatenated to the row number i’m writing. Each time, the writecell produces the cell in the desired column and row, but also in the just previous column and row. The variable I’m writing is a single cell element. My code is:
Clm = cell2mat(ColmnName(jj));
Rng = [Clm num2str(irow)];
writecell(Cost,fnameout,’Sheet’,1,’Range’,Rng);
where, Clm = ‘AE’, irow = 31, Cost is a cell variable that changes each call, in this case Cost = 1×1 cell array / {[255.7800]}
writecell wrote to column AD and AE in row 31.I am writing a since cell varialbe to an excel spreadsheet and the desired range changes each time. I decode the range as a selected Column (i.e., ‘AX’) concatenated to the row number i’m writing. Each time, the writecell produces the cell in the desired column and row, but also in the just previous column and row. The variable I’m writing is a single cell element. My code is:
Clm = cell2mat(ColmnName(jj));
Rng = [Clm num2str(irow)];
writecell(Cost,fnameout,’Sheet’,1,’Range’,Rng);
where, Clm = ‘AE’, irow = 31, Cost is a cell variable that changes each call, in this case Cost = 1×1 cell array / {[255.7800]}
writecell wrote to column AD and AE in row 31. I am writing a since cell varialbe to an excel spreadsheet and the desired range changes each time. I decode the range as a selected Column (i.e., ‘AX’) concatenated to the row number i’m writing. Each time, the writecell produces the cell in the desired column and row, but also in the just previous column and row. The variable I’m writing is a single cell element. My code is:
Clm = cell2mat(ColmnName(jj));
Rng = [Clm num2str(irow)];
writecell(Cost,fnameout,’Sheet’,1,’Range’,Rng);
where, Clm = ‘AE’, irow = 31, Cost is a cell variable that changes each call, in this case Cost = 1×1 cell array / {[255.7800]}
writecell wrote to column AD and AE in row 31. using range in writecell MATLAB Answers — New Questions

​

Leave a Reply

Your email address will not be published. Required fields are marked *