How to keep Excel template format when using writetable

Hi. I,m trying to export my data to Excel file by using writetable function, but when I use this function, the destination file format will be reset. How should I do to keep the template format unchanged?

댓글 수: 2

upload your code and datas to export
The simple sample code and mentioned template are attached.

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

답변 (1개)

madhan ravi
madhan ravi 2018년 10월 28일
편집: madhan ravi 2018년 10월 28일
t = readtable ('testFile.xlsx')
t.Var2(1,:) = 4
writetable(t,'testFile.xlsx');

댓글 수: 2

It works when I use Matlab R2014a and Excel 2010. But on my laptop, I use Matlab R2018b and Excel 2016 and it doesn't work. The table will be written on Excel file bu the template format will be deleted.
madhan ravi
madhan ravi 2018년 10월 29일
편집: madhan ravi 2018년 10월 29일
I use 2018b matlab and excel 2016 , it works in mine but no idea what’s the mystery behind yours

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

카테고리

도움말 센터File Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기

질문:

2018년 10월 28일

편집:

2018년 10월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by