Matrix | A list of lists. Every list has the same number of elements. |
HeaderList | Optional. Column headers to print at the top. By default prints nothing. |
ColumnMaxWidthList | Optional. List of values to use to limit the width of each column. By default column widths will each be big enough to fit max length cell in that column. |
report
but is simpler (and less powerful).Note that in the case of an empty list or empty string (which are not matrices), this command will not throw an error, but will rather print out a list of headers, if any, and exit.
To make a column width match the length of the longest string in it, you can put max
rather than a number. PrintMatrix will then compute the max length for that column and use that.
Note that this will truncate cell contents if they go beyond the max width. Again, see report
for something more full-featured.