Main Content

mlreportgen.dom.ColSep Class

Namespace: mlreportgen.dom

Draw lines between table columns

Description

Draw lines between table columns.

The mlreportgen.dom.ColSep class is a handle class.

Creation

Description

colSepObj = ColSep creates unspecified column separators.

colSepObj = ColSep(style) creates a column separator of the specified style.

colSepObj = ColSep(style,color) creates a column separator having the specified style and color.

colSepObj = ColSep(style,color,width) creates a column separator having the specified style, color, and width.

example

Input Arguments

expand all

Style of the table column separator, specified as one of these values.

ValueSupported in DOCXSupported in HTML and PDF
"dashed"YesYes
"dashdotstroked"YesNo
"dashsmallgap"YesNo
"dotted"YesYes
"dotdash"YesNo
"dotdotdash"YesNo
"double"YesYes
"doublewave"YesNo
"inset"YesYes
"none"YesYes
"outset"YesYes
"single"YesNo
"solid"NoYes
"thick"YesNo
"thickthinlargegap"YesNo
"thickthinmediumgap"YesNo
"thickthinsmallgap"YesNo
"thinthicklargegap"YesNo
"thinthickmediumgap"YesNo
"thinthicksmallgap"YesNo
"thinthickthinlargegap"YesNo
"thinthickthinmediumgap"YesNo
"thinthickthinsmallgap"YesNo
"threedemboss"YesNo
"threedengrave"YesNo
"triple"YesNo
"wave"YesNo

You can specify:

Separator width as a percentage, specified as character vector or string scalar that contains a number followed by an abbreviation for a unit of measurement. For example, "10%" specifies ten percent. Valid abbreviations are:

  • px — Pixels

  • cm — Centimeters

  • in — Inches

  • mm — Millimeters

  • pc — Picas

  • pt — Points

  • % — Percent

Properties

expand all

Column separator color, specified as a character vector or string scalar that contains a CSS color name or hexadecimal RGB value.

  • To use the name of a color, specify a CSS color name. For a list of CSS color names, seehttps://www.w3.org/wiki/CSS/Properties/color/keywords.

  • To specify a hexadecimal RGB format, use # as the first character and two-digit hexadecimal numbers for the red, green, and blue values. For example, "#0000ff" specifies blue.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Separator width as a percentage, for example, "100%", or a number of units of measurement in the form valueUnits where Units is an abbreviation for the units. Use one of these abbreviations for the units of a width.

  • "px" — Pixels

  • "cm" — Centimeters

  • "in" — Inches

  • "mm" — Millimeters

  • "pc" — Picas

  • "pt" — Points

Example: "100%"

Example: "3pt" specifies three points.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Column Separator style, specified as a character vector or string scalar. Specify one of these values:

Border StyleDescriptionSupported in Microsoft® WordSupported in HTML and PDF
"dashed"Dashed lineyesyes
"dashdotstroked"Line with alternating diagonal dashes and dotyesyes
"dashsmallgap"Dashed line with a small gap between dashesyesyes
"dotted"Dotted lineyesyes
"dotdash"Line with alternating dots and dashesyesno
"dotdotdash"Line with alternating double dots and a dashyesno
"double"Double lineyesyes
"doublewave"Double wavy lineyesno
"groove"3-D effect grooved linenoyes
"hidden"

No line

When there is a conflicting border style, the "hidden" border style takes precedence over the conflicting border style, which results in no line displaying.

noyes
"inset"3-D effect linenoyes
"none"

No line

When there is a conflicting border style, the conflicting border style takes precedence over "none", which results in the conflicting border style displaying.

yesyes
"outset"3-D effect lineyesyes
"ridge"3-D effect ridged linenoyes
"single"Single lineyesyes
"solid"Single linenoyes
"thick"Thick lineyesno
"thickthinlargegap"Dashed line with alternating thick and thin dashes with a large gapyesno
"thickthinmediumgap"Dashed line with alternating thick and thin dashes with a medium gapyesno
"thickthinsmallgap"Dashed line with alternating thick and thin dashes with a small gapyesno
"thinthicklargegap"Dashed line with alternating thin and thick dashes with a large gapyesno
"thinthickmediumgap"Dashed line with alternating thin and thick dashes with a medium gapyesno
"thinthicksmallgap"Dashed line with alternating thin and thick dashes with a small gapyesno
"thinthickthinlargegap"Dashed line with alternating thin and thick dashes with a large gapyesno
"thinthickthinmediumgap"Dashed line with alternating thin and thick dashes with a medium gapyesno
"thinthickthinsmallgap"Dashed line with alternating thin and thick dashes with a small gapyesno
"threedemboss"Embossed effect lineyesno
"threedengrave"Engraved effect lineyesno
"triple"Triple lineyesno
"wave"Wavy lineyesno

Note

For Microsoft Word reports, when you assign an mlreportgen.dom.Border object to the Style property of an mlreportgen.dom.TableHeaderEntry, mlreportgen.dom.TableEntry, or mlreportgen.dom.HorizontalRule object, the reporter does not support "inset" or "outset" styles for this property.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Tag, specified as a character vector or string scalar. The DOM API generates a session-unique tag as part of the creation of this object. The generated tag has the form CLASS:ID, where CLASS is the object class and ID is the value of the Id property of the object. Use this value to help identify where an issue occurs during document generation.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Object identifier, specified as a character vector or string scalar. The DOM API generates a session-unique identifier when it creates the document element object.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Examples

collapse all

This example creates table and sets the border, column separator, and row separator styles. The TableEntriesStyle property formats the table entries.

import mlreportgen.dom.*;
doctype = 'html';
d = Document('test',doctype);
t = Table(magic(5));

t.Style = { ...
    RowHeight('0.75in'), ...
    Border('solid','Green','6pt'), ...
    ColSep('double','DarkGreen','3pt'), ...
    RowSep('single','DarkGreen')};

t.TableEntriesStyle = { ...
    Width('0.75in'), ...
    InnerMargin('0'), ...
    OuterMargin('0'), ...
    HAlign('center'), ...
    VAlign('middle') };
    
append(d,t);
close(d);
rptview(d.OutputPath);

Version History

Introduced in R2014b