issue with writetable in 2019b

조회 수: 7 (최근 30일)
Pete sherer
Pete sherer 2019년 9월 24일
답변: Tarsha 2019년 12월 30일
Hi I observed behavior changed in writetable function between 2019a and 2019b.
In 2019a, when Matlab write data to excel file using writetable, it will create a temp file and close it every call (just like when you open an excel file). In 2019b, I didn't have this behavior. It seems when writing to excel file, it doesn't create the excel temp file, but it restart the excel file from zero kb size and keep growiing in size. Not sure if that is an issue, but it screwd up the format in excel. The short date format in excel is overridden by Matlab. All the highlighted cells were disappeared whenever there are data written to it.
Mathworks please fix this issue in 2019b.

채택된 답변

Steven Lord
Steven Lord 2019년 9월 24일
The Release Notes state that there are some changes related to writetable in release R2019b. As that note suggests, try adding the 'UseExcel' parameter to your writetable call to determine if the previous behavior it preserves is what you want.
  댓글 수: 1
Pete sherer
Pete sherer 2019년 9월 24일
thank you very much. It solved the issue when adding , 'UseExcel', true as part of input.

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

추가 답변 (1개)

Tarsha
Tarsha 2019년 12월 30일
Thank you for this response! I had all but given up on using writetable with *.xlsx files until I saw this. Basic syntax is:
writetable(data_T,'data.xlsx','UseExcel',false);
I hope the folks who have been asking about this over the years make it to this page!

카테고리

Help CenterFile Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by