Choose Type of Table to Create
You can use the DOM API and Report API to create four types of tables in your reports. The types of tables have different structures and are represented by different classes.
Type of Table | Class | Example (in PDF) | More Information |
---|---|---|---|
Formal table — A table with differently formatted header, body, and footer sections | mlreportgen.dom.FormalTable |
| Create Formal Tables |
Informal table — A table that has only a body | mlreportgen.dom.Table |
| Create Informal Tables |
MATLAB® table — A table constructed from a MATLAB table | mlreportgen.dom.MATLABTable |
| Create Tables from MATLAB Tables |
Base table — A table with a numbered title | mlreportgen.report.BaseTable |
| Create Report API Base Tables |
The following guidelines help you choose the type of table to create based on your table requirements. The guidelines are not exhaustive. In some cases, more than one type of table might meet your requirements. In these cases, you can choose the type of table based on your preferences.
Requirement | Type of Table |
---|---|
Create a table with a header or footer. |
|
Create a table without a header or footer. | Informal table |
Convert a MATLAB table to a DOM table. | DOM representation of a MATLAB table
( |
Create a table with a numbered title. | Base table You can first create a DOM table, and then create the base table from the DOM table or you can create the base table directly from a MATLAB array. |
Divide a wide table into legible slices. | Base table If a DOM table is too wide, you can create a
base table from the DOM table and then use the |
See Also
mlreportgen.dom.Table
| mlreportgen.dom.FormalTable
| mlreportgen.report.BaseTable
| mlreportgen.dom.MATLABTable