MATLAB: How to update the text field from the loaded excel file in MATLAB

MATLABupdate text field

I encountered a problem to update the text field from the loaded excel file in MATLAB.

Best Answer

[num, txt, raw] = xlsread('TheFilename.xlsx');
raw{7,11} = 'Some New String'; %update the location in memory
xlswrite('TheFilename.xlsx', raw) %store everything back
OR,
newcontent = 'Some New String';
xlswrite('TheFilename.xlsx', newcontent, 'K7:K7'); %update only the one location