フィルターのクリア

How to keep Excel template format when using writetable

5 ビュー (過去 30 日間)
Morteza
Morteza 2018 年 10 月 28 日
編集済み: madhan ravi 2018 年 10 月 29 日
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 件のコメント
madhan ravi
madhan ravi 2018 年 10 月 28 日
upload your code and datas to export
Morteza
Morteza 2018 年 10 月 28 日
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 件のコメント
Morteza
Morteza 2018 年 10 月 29 日
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

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by