필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
KenL
KenL 2016년 10월 3일
댓글: KenL 2016년 10월 3일
I encountered a problem to update the text field from the loaded excel file in MATLAB.

채택된 답변

Walter Roberson
Walter Roberson 2016년 10월 3일
[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
  댓글 수: 2
KenL
KenL 2016년 10월 3일
Thanks for the prompt response. I managed to update the field at location of raw{7,11} but all my data before such location are replaced with "NaN". Please advise.
KenL
KenL 2016년 10월 3일
Hi...I did a mistake. Now, problem solved. Thanks.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by