writetable change "Row" in cell A1

7 次查看(过去 30 天)
I'm familiar with the writetable function to save a table as an Excel file. I regularly use the WriteRowNames option to include the row names in the file. However, when Matlab writes the file it always write "Row" as the title of the series above the row names in cell A1 of the Excel file. Is there any way to change this label?

采纳的回答

Peter Perkins
Peter Perkins 2015-4-8
David, you can set the dimension names property, such as
data.Properties.DimensionNames{1} = 'SomethingOtherThanRow';
Hope this helps.
  1 个评论
Leon
Leon 2024-2-15
编辑:Leon 2024-2-15
Very helpful! One minor correction: I found I needed to use brackets rather than curly braces:
my_table.Properties.DimensionNames(1) = "SomethingOtherThanRow";

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Tables 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by