writecell produces two cells when Range is a sigle cell
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Text Files en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!