Remove line present under column names in table
Show older comments
Hi all,
I have added some tables in word document using report generator 'Document' Class. However I am getting some lines(underlines) for column names in a table. I want to remove these lines. Kindly let me know how this can be done.
Below is the example of problem i am facing. I am attaching an image as well for your reference. I am using 2019a version.Thanks.
Age
___
38
43

Accepted Answer
More Answers (1)
SC
on 1 Jul 2020
You can first create an array of structs 's' with Age and 'Gender' as fields,
s(1).Age = 38;
s(1).Gender = 'Male';
s(2).Age = 43;
s(2).Gender = 'Male';
s(3).Age = 38;
s(3).Gender = 'Female';
Visit the following to see, how it is done:
and use
T = struct2table(s);
If T is a table and D is your document, you can append your table by
MT = MATLABTable(T);
append(D, MATLABTable(T));
3 Comments
Walter Roberson
on 1 Jul 2020
The poster already has a table. The problem is that inside Report Generator, the name of the variables are being underlined, and they do not want the variable names to be underlined. This has nothing to do with how the table object was generated, and has to do with how table objects are formatted for Report Generator.
Sampath Rachumallu
on 1 Jul 2020
Walter Roberson
on 1 Jul 2020
Sorry, I do not know that. I have never used Report Generator.
I have encounted the fact that Report Generator supports Style Sheets, but I do not know how to get from that fact to specific representation of table objects.
Categories
Find more on MATLAB Report Generator Task Examples in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!