06-13-2018 01:49 PM
I have a report created using Excel ODS and Proc Print. When I print the resulting Excel file, the right-most column (D) does not print with the rest of the page (but rather on a separate page). I've tried using absolute_column_width to reduce the size of column A (which is wider than all other columns) but it has no effect. I also tried fittopage='1' but that seems to apply to rows as well as columns and results in teeny-tiny unreadable print. How can I control the page width breaks?
Here's my code:
ODS excel FILE="&QTRLYRPT..xlsx";
ods excel options (
PROC PRINT DATA=II LABEL split='|';
_NAME_='II. SELECTED EXIT CATEGORY SUMMARY |(Related Assistance Services-Only Exiters Excluded)'
COL1 = 'All Career Service Exiters'
COL2 = 'Classroom Training'
COL3 = 'On-the-job Training'
COL4 = 'Work Experience'
format _name_ $IIROWS. ;
06-13-2018 02:48 PM
Please create your code with some sashelp datasets, so that we will be able to run and see or provide the sample data you have.
06-13-2018 04:03 PM
06-13-2018 08:10 PM
You can try
and see if it works for your printer.
I ran the program to create the spreadsheet, then manually adjusted the columns to make them fit on a page. Then I used the CELL function in Excel to see how wide each column was, and used those numbers for the absolute_column_width option on the ODS Excel statement.
See Formula Watch: Use the Cell function to check column width, column number, and more for more information about the CELL function in Excel.
The screen shot below shows what the report looks like for me when I use the absolute_column_width option.