putexcel advanced — Export results to an Excel file using advanced syntax 9
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
in [P] putexcel. To remove an existing border, specify none as the style.
color may be a valid RGB value in the form "### ### ###" or may be one of the colors listed
in the table of colors in the Appendix in [P] putexcel. 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
in [P] putexcel. To remove an existing border, specify none as the style.
color may be a valid RGB value in the form "### ### ###" or may be one of the colors listed
in the table of colors in the Appendix in [P] putexcel. 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
of [P] putexcel. 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 a
valid RGB value in the form "### ### ###" or may be any of the colors listed in the table of
colors in the Appendix in [P] putexcel.
bgcolor specifies the background color. bgcolor may be a valid RGB value in the form "### ###
###" or may be any of the colors listed in the table of colors in the Appendix in [P] putexcel.
If no bgcolor is specified, then Excel workbook defaults are used.
Remarks and examples stata.com
If you have not already read Remarks and examples in [P] putexcel, please do so now. The
examples here build on the examples shown there.
Remarks are presented under the following headings:
Writing expressions and formatting cells
Using formulas
Exporting estimation results