MATLAB Answers

HD
0

save data in an existing xls file but in new sheet

Asked by HD
on 2 May 2016
Latest activity Commented on by HD
on 4 May 2016
Accepted Answer by Jan
HI,
I would like to save (xlswrite) data in a excel file. If the files already exist, I would like to force saving the data in a new sheet that I don't really now its number.
Is this possible with matlab?
Thanks in advance!

  0 Comments

Sign in to comment.

1 Answer

Answer by Jan
on 2 May 2016
 Accepted Answer

Use xlsinfo :
[status, sheets] = xlsinfo(filename);
newSheetNumber = numel(sheets) + 1;

  1 Comment

thank you, it works well !

Sign in to comment.