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!
0 个评论
采纳的回答
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 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!