Ron Vaisman
Ron Vaisman

Reputation: 169

Adding information to excel sheet using matlab without xlswrite

I want to add information to the end of an excel sheet using MATLAB R2019. However, MATLAB doesn't support xlswrite anymore

 [mainSize,~] = size(mainraw);
 xlswrite('test.xlsx',A,1,int2str(mainSize+1));

how can I make it work on MATLAB R2019?

Upvotes: 0

Views: 636

Answers (1)

Azim J
Azim J

Reputation: 8290

You are correct that xlswrite has been deprecated. As mentioned in the xlswrite docmentation the alternatives are writetable, writematrix, and writecell.

For your case try to use writematrix to append data to the contents of Sheet1; as in:

writematrix(A,'test.xlsx','Sheet','Sheet1','Range','A1', ...
           'WriteMode','append');

Upvotes: 2

Related Questions