How to add several forced line breaks inside a table cell, when I try to generate a Microsoft word report using Matlab?
17 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Yueqian Liang
le 12 Déc 2023
Commenté : Yueqian Liang
le 15 Déc 2023
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 commentaires
Réponse acceptée
Fangjun Jiang
le 12 Déc 2023
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']
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Tables dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!