Database Reference
In-Depth Information
Figure 8.30: Output for Example Generating an ExcelXP File with No Options Set.
Example 8.16.2 Adjusting Column Width Using Tagset Template Options
This example shows how you can adjust the column width of each column in a worksheet by listing the size
of each column as part of an option called ABSOLUTE_COLUMN_WIDTH. Each column is listed as a
number describing the width of each column.
Table 8.9: Options Used in Example 8.16.2.
ExcelXP Option
Setting in Example
Result
ABSOLUTE_COLUMN_WIDTH
'4,19,10.5,10,5,8,8,8'
Set column widths for each
column.
Figure 8.31: ODS Code to Define Column Sizes While Writing the Output File.
ODS TAGSETS.EXCELXP BODY ='c:\temp\ExcelXP\shoes2.xml'
OPTIONS(ABSOLUTE_COLUMN_WIDTH='4,19,10.5,10,5,8,8,8');
PROC PRINT DATA=sashelp.shoes;
RUN;
ODS TAGSETS.EXCELXP CLOSE;
The code in Figure 8.31 will set the column widths to pre-selected values. Each number represents the
width of a column. The values are assigned in the order listed. If more columns exist than numbers in the
list, then the list is reused until all columns are assigned a width. Look at the differences in the column
widths in Figure 8.30 and Figure 8.32.
 
Search WWH ::




Custom Search