Object Reference : Object View and Procedure Reference : Table
  
Table
 
clearhist
clearremarks
comment
copy
copyrange
copytable
deletecells
deletecol
deleterow
display
displayname
fixcol
fixrow
fixrowcol
insertcells
insertcol
insertrow
insertrow
label
olepush
save
setattr
setfillcolor
setfont
setformat
setheight
setindent
setjust
setlines
setmerge
setprefix
setsuffix
settextcolor
setwidth
sheet
sort
table
title
transpose
Table object. Formatted two-dimensional table for output display.
Table Declaration
freeze freeze tabular view of object.
table create table object.
To declare a table object, use the keyword table, followed by an optional row and column dimension, and then the object name:
table onelement
table(10,5) outtable
If no dimension is provided, the table will contain a single element.
Alternatively, you may declare a table using an assignment statement. The new table will be sized and initialized, accordingly:
table newtable=outtable
Lastly, you may use the freeze command to create tables from tabular views of other objects:
freeze(newtab) ser1.freq
Table Views
display display table, graph, or spool in object window.
label label information for the table object.
sheet view the table.
table view the table.
Table Procs
clearhist clear the contents of the history attribute.
clearremarks clear the contents of the remarks attribute.
comment adds or removes a comment in a table cell.
copy creates a copy of the table.
copyrange copies a portion of the table to another table.
copytable copies the entire table to another table.
deletecells delete cells from a table.
deletecol remove columns from a table.
deleterow remove rows from a table.
displayname set display name.
fixcol fixes a set of columns to left of the spreadsheet view so that the leading columns are always in view.
fixrow fixes a set of rows at the top of the spreadsheet view so that the leading rows are always in view.
fixrowcol fixes a set of rows at the top and a set of columns to left of a spreadsheet view so that the leading rows and columns are always in view
insertcells insert cells into a table.
insertcol insert additional columns into a table.
insertrow insert additional rows into a table.
olepush push updates to OLE linked objects in open applications.
save save table as Excel 2007 XLSX, CSV, tab-delimited ASCII text, RTF, HTML, Enhanced Metafile, PDF, LaTeX, or Markdown file on disk.
setattr set the value of an object attribute.
setfillcolor set the fill (background) color of a set of table cells.
setfont set the font for the text in a set of table cells.
setformat set the display format of a set of table cells.
setheight set the row height in a set of table cells.
setindent set the indentation for a set of table cells.
setjust set the justification for cells in the table.
setlines set the line characteristics and borders for a set of table cells.
setmerge merge or unmerge a set of table cells.
setprefix set the cell prefix string for the specified table cells.
setsuffix set the cell suffix string for the specified table cells.
settextcolor set the text color in a set of table cells.
setwidth set the column width for a set of table cells.
sort sort the rows of the specified selection of cells.
title assign or change the title of a table.
transpose transposes a set of cells in the table.
Table Data Members
String values
(i,j) the (i,j)-th element of the table, formatted as a string.
@attr("arg") string containing the value of the arg attribute, where the argument is specified as a quoted string.
@description string containing the Table object’s description (if available).
@detailedtype string with the object type: “TABLE”.
@displayname string containing the Table object’s display name. If the Table has no display name set, the name is returned.
@find("arg") string containing the cell identifiers meeting the boolean argument. This argument can be a mathematical or string expression. For example:
string s = tab1.@find("[b1:c15]>0.3")
returns a list of cells between B1 and C15 greater than 0.3;
string s = tabl1.@find("[a1:e67]== ""1949q4""")
returns a list of cells between A1 and E67 matching the string “1949q4” (string comparisons in @find ignore case);
string s = tab1.@find("[@all]==0.5")
returns a list of cells in the table equal to 0.5;
string s = t.@find("@instr([@all],""in"")")
returns a list of cells in the table containing the substring ‘in’;
string s = t.@find("[b3:c5]<[d5]")
returns a list of cells between B3 and C5 less than cell D5;
string s = t.@find("@left([@all],1)==""cp"")
returns a list of cells starting with “cp”.
(See “Conditional Table Cells” in Command and Programming Reference for syntax discussion.)
@name string containing the Table object’s name.
@remarks string containing the Table object’s remarks (if available).
@title string containing the Table object’s title (if available).
@type string with the object type: “TABLE”.
@updatetime string representation of the time and date at which the Table was last updated.
Scalar values
@cols number of columns in the table.
@colwidth(i) the column width of the i-th column in the table.
@rowheight(i) the row height of the i-th row in the table.
@rows number of rows in the table.
@val(i,j) the numerical value of the (i,j)-th element of the table.
Table Commands
setcell format and fill in a table cell.
setcolwidth set width of a table column.
setline place a horizontal line in table.
tabplace insert a table into another table.
Note that with the exception of tabplace, these commands are supported primarily for backward compatiblity. There is a more extensive set of table procs for working with and customizing tables. See “Table Procs”.
Table Examples
table(5,5) mytable
%strval = mytable(2,3)
mytable(4,4) = "R2"
mytable(4,5) = @str(eq1.@r2)