How to keep Excel template format when using writetable

4 Ansichten (letzte 30 Tage)
Morteza
Morteza am 28 Okt. 2018
Bearbeitet: madhan ravi am 29 Okt. 2018
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 Kommentare
madhan ravi
madhan ravi am 28 Okt. 2018
upload your code and datas to export
Morteza
Morteza am 28 Okt. 2018
The simple sample code and mentioned template are attached.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

madhan ravi
madhan ravi am 28 Okt. 2018
Bearbeitet: madhan ravi am 28 Okt. 2018
t = readtable ('testFile.xlsx')
t.Var2(1,:) = 4
writetable(t,'testFile.xlsx');
  2 Kommentare
Morteza
Morteza am 29 Okt. 2018
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 am 29 Okt. 2018
Bearbeitet: madhan ravi am 29 Okt. 2018
I use 2018b matlab and excel 2016 , it works in mine but no idea what’s the mystery behind yours

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by