How to add several forced line breaks inside a table cell, when I try to generate a Microsoft word report using Matlab?

14 次查看(过去 30 天)
Hi,
I'm trying to generate a Microsoft word report using Matlab, which contains serval tables.
I want to add several forced line breaks inside one table cell, like the figure below.
How can I have this?
Thanks!

采纳的回答

Fangjun Jiang
Fangjun Jiang 2023-12-12
I tried and the line break in a cell in an Excel file is char(10). I think it is likely the same in Word.
In MATLAB, newline is the same as char(10).
So you can construct your table data like this:
data{1,2}=['Aaa',newline,'Bbb',newline,'Ccc']

更多回答(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