10 putexcel — Export results to an Excel file
Border
border(border
, style
, color
) sets the cell border, style, and color for a cell or range of cells.
border may be all, left, right, top, or bottom.
style is a keyword specifying the look of the border. The most common styles are thin, medium,
thick, and double. The default is thin. For a complete list of border styles, see the Appendix.
To remove an existing border, specify none as the style.
color may be one of the colors listed in the table of colors in the Appendix or may be a valid
RGB value in the form "### ### ###". If no color is specified, then Excel workbook defaults
are used.
dborder(direction
, style
, color
) sets the cell diagonal border direction, style, and color for
a cell or range of cells.
direction may be down, up, or both. down draws a line from the upper-left corner of the cell to
the lower-right corner of the cell or, for a range of cells, from the upper-left corner of ul
cell
to the lower-right corner of lr cell. up draws a line from the lower-left corner of the cell to
the upper-right corner of the cell or, for a range of cells, from the lower-left corner of the area
defined by ul cell:lr cell to the upper-right corner.
style is a keyword specifying the look of the border. The most common styles are thin, medium,
thick, and double. The default is thin. For a complete list of border styles, see the Appendix.
To remove an existing border, specify none as the style.
color may be one of the colors listed in the table of colors in the Appendix or may be a valid
RGB value in the form "### ### ###". If no color is specified, then Excel workbook defaults
are used.
Fill
fpattern(pattern
, fgcolor
, bgcolor
) sets the fill pattern, foreground color, and background
color for a cell or range of cells.
pattern is a keyword specifying the fill pattern. The most common fill patterns are solid for a
solid color (determined by fgcolor), gray25 for 25% gray scale, gray50 for 50% gray scale,
and gray75 for 75% gray scale. A complete list of fill patterns is shown in the Appendix. To
remove an existing fill pattern from the cell or cells, specify none as the pattern.
fgcolor specifies the foreground color. The default foreground color is black. fgcolor may be any
of the colors listed in the table of colors in the Appendix or may be a valid RGB value in the
form "### ### ###".
bgcolor specifies the background color. bgcolor may be any of the colors listed in the table of
colors in the Appendix or may be a valid RGB value in the form "### ### ###". If no bgcolor
is specified, then Excel workbook defaults are used.
The following options are available when exporting a collection:
name(cname) specifies a collection cname from which to export the table. By default, the table is
taken from the current collection.
noisily specifies that the putexcel commands used to export to the workbook be displayed.
dofile(filename
, replace
) specifies that putexcel save to filename the commands used to
export to the workbook. If filename already exists, it can be overwritten by specifying replace.
If filename is specified without an extension, .do is assumed.