Table Properties - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Table Properties using DocumentTools

• 

The table properties control the appearance and behavior of a table in a worksheet or document.

• 

In a document, tables are inserted using the Insert menu. The table is then customized by using the options in the Table Properties dialog. The Table Properties dialog is found in the Format > Table menu under Properties or through the context panel for a table.

• 

For an overview of inserting and using tables in a document, including working with content in table cells, see Overview of Tables.

• 

You can also access some table properties programmatically, as you can access embedded components. This help page describes the control and use of table properties programmatically.

• 

The Name property is used to reference the table when using the routines from the DocumentTools package. For more information, see the Examples on this page.

 

Table Properties

Examples

Table Properties

• 

Some table properties can be accessed programmatically using commands from the DocumentTools package. The following chart describes these table properties.

  

An x in the Get column indicates that the option can be read, that is, retrieved by using the DocumentTools[GetProperty] tool.

  

An x in the Set column indicates that the option can be written, that is, set by using the DocumentTools[SetProperty] tool.

  

 

Option

Get

Set

Option Type

alignment

x

x

string: left, center or right

editable

x

x

true or false

exterior

x

x

string: all, none, left, top, right, bottom, horizontal, vertical

fillcolor

x

x

color

fillcolor[row]

x

x

color

fillcolor[row,col]

x

x

color

id

 

x

string

interior

x

x

string: all, none, group

title

x

x

list or set

visible

x

x

true or false

visible[row]

x

x

true or false

visible[row,col]

x

x

true or false

width

x

x

percentage given as a string

  


alignment 

  

Specifies the alignment of the table. By default, the value is left.

  

editable 

  

Specifies if the table can be modified or not. The default is true.

  

exterior 

  

Indicates how exterior borders are drawn. It can be any of the following: all, none, left, top, right, bottom, horizontal, vertical. The default is all.

  

fillcolor 

  

Specifies the background color of the table. The color can be given by RGB values (a list of three integers between 0 and 255) or a string representing a color name, for example, [255,0,0] or “Red”. You can also use any color known to ColorTools[ToRGB24]. The default value is [255,255,255] which corresponds to white.

  

fillcolor[row] 

  

Specifies the background color of a row, where row is a positive integer or range.

  

fillcolor[row,column] 

  

Specifies the background color of a cell, where row and column are each a positive integer or range.

  

id 

  

The reference name of the table.

  

interior 

  

Indicates how interior borders are drawn. It can be all, none, or group. The default is all.

  

title 

  

Specify a caption for the table.

  

visible 

  

Specifies if the table is visible. By default, the value is true.

  

visible[row] 

  

Specifies if a row of the table is visible, where row is a positive integer or range.

  

visible[row,column] 

  

Specifies if a cell of the table is visible, where row and column are each a positive integer or range.

  

width 

  

The width of the table as a percentage of the worksheet's width, e.g. "50%". The default is "100%".

  

 

• 

For the fillcolor and visible properties, the DocumentTools commands may raise an error in the case of an invalid cell reference or mixed results. For example, consider a 2x2 table where the first row is merged into one cell. Referencing visible(1,1) would be OK but visible(1,2) would raise an error.

• 

For examples demonstrating accessing or changing these properties programmatically, see the Examples below.

Examples

Note: To interact with the examples provided below, open this help page as a worksheet and then execute the worksheet.

When you insert a table, note its name in the Insert Table dialog. You can also check its name in the Table Properties for the table. The name of the table on the right is Table0.

withDocumentTools:

GetPropertyTable0,alignment

left

(2.1)

SetPropertyTable0,width,75%

Set the background color of one cell.

SetPropertyTable0,fillcolor2,1,Orange

Set the background color of the second column to teal.

SetPropertyTable0,fillcolor..,2,0,128,128

Return the table to its original state.

SetPropertyTable0,width,100%,Table0,fillcolor,255,255,255

 

 

 

 

 

 

 

 

See Also

DocumentTools

DocumentTools[GetProperty]

DocumentTools:-Layout:-Table

DocumentTools[SetProperty]

EmbeddedComponents

range

table

worksheet/documenting/table