<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Cannot WrapText and AUTOFIT_HEIGHT in excel in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Cannot-WrapText-and-AUTOFIT-HEIGHT-in-excel/m-p/53722#M6661</link>
    <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
This post is the same example as the previous posts but facing a different issue with not being able to wrap text in excel output.&lt;BR /&gt;
&lt;BR /&gt;
ODS LISTING CLOSE;&lt;BR /&gt;
ODS TAGSETS.EXCELXP FILE="&amp;amp;rep_filename."&lt;BR /&gt;
STYLE=styles.printer&lt;BR /&gt;
OPTIONS(EMBEDDED_TITLES='yes' 		&lt;BR /&gt;
		SHEET_INTERVAL = 'none' &lt;BR /&gt;
		WIDTH_FUDGE	='0.75' 	&lt;BR /&gt;
		SHEET_NAME = "&amp;amp;customer_number"&lt;BR /&gt;
		DEFAULT_COLUMN_WIDTH="10,0,8,8,8,8,8,8,8"  &lt;BR /&gt;
		FITTOPAGE = 'yes'  	&lt;BR /&gt;
		PAGES_FITWIDTH 	= '1' 	&lt;BR /&gt;
		Pages_FitHeight = '100'&lt;BR /&gt;
		FROZEN_HEADERS 	= 'yes' 	&lt;BR /&gt;
		FROZEN_ROWHEADERS 	= 'yes'&lt;BR /&gt;
		GRIDLINES 			= 'no' 		&lt;BR /&gt;
		AUTOFIT_HEIGHT 		= 'yes' &lt;BR /&gt;
		PRINT_FOOTER 		= 'Page: &amp;amp;P of &amp;amp;N'&lt;BR /&gt;
		WRAPTEXT			= 'yes'&lt;BR /&gt;
	)&lt;BR /&gt;
	;&lt;BR /&gt;
ODS TAGSETS.EXCELXP &lt;BR /&gt;
OPTIONS(EMBEDDED_TITLES='yes' &lt;BR /&gt;
		SHEET_INTERVAL='none' &lt;BR /&gt;
		SHEET_NAME="&amp;amp;customer_number"  &lt;BR /&gt;
		ROW_REPEAT 		= '1 - 4'&lt;BR /&gt;
		FROZEN_HEADERS 	= '1 - 4'&lt;BR /&gt;
);&lt;BR /&gt;
&lt;BR /&gt;
title;&lt;BR /&gt;
%*------ Export Main Report to EXCEL;&lt;BR /&gt;
proc report data=sashelp.shoes split='*' &lt;BR /&gt;
	style(header) =[font_size=9pt font_weight=bold font_face=Arial borderwidth=1pt cellspacing=0pt cellpadding=1pt]&lt;BR /&gt;
	style(column) =[font_size=9pt font_face=Arial borderwidth=1pt cellspacing=0pt  cellpadding=1pt]&lt;BR /&gt;
	;&lt;BR /&gt;
	columns region product; &lt;BR /&gt;
&lt;BR /&gt;
	define	region		/	display	"Region"  style(column)={outputwidth=0.5in font_face=arial };&lt;BR /&gt;
	define	product		/	display	"Product" style(column)={outputwidth=0.5in font_face=arial };&lt;BR /&gt;
run;&lt;BR /&gt;
title;&lt;BR /&gt;
&lt;BR /&gt;
%*------ CLOSE ODS TAGSETS.EXCELXP;&lt;BR /&gt;
ODS TAGSETS.EXCELXP CLOSE;&lt;BR /&gt;
ODS LISTING</description>
    <pubDate>Wed, 20 Apr 2011 10:56:00 GMT</pubDate>
    <dc:creator>SanjayM</dc:creator>
    <dc:date>2011-04-20T10:56:00Z</dc:date>
    <item>
      <title>Cannot WrapText and AUTOFIT_HEIGHT in excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Cannot-WrapText-and-AUTOFIT-HEIGHT-in-excel/m-p/53722#M6661</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
This post is the same example as the previous posts but facing a different issue with not being able to wrap text in excel output.&lt;BR /&gt;
&lt;BR /&gt;
ODS LISTING CLOSE;&lt;BR /&gt;
ODS TAGSETS.EXCELXP FILE="&amp;amp;rep_filename."&lt;BR /&gt;
STYLE=styles.printer&lt;BR /&gt;
OPTIONS(EMBEDDED_TITLES='yes' 		&lt;BR /&gt;
		SHEET_INTERVAL = 'none' &lt;BR /&gt;
		WIDTH_FUDGE	='0.75' 	&lt;BR /&gt;
		SHEET_NAME = "&amp;amp;customer_number"&lt;BR /&gt;
		DEFAULT_COLUMN_WIDTH="10,0,8,8,8,8,8,8,8"  &lt;BR /&gt;
		FITTOPAGE = 'yes'  	&lt;BR /&gt;
		PAGES_FITWIDTH 	= '1' 	&lt;BR /&gt;
		Pages_FitHeight = '100'&lt;BR /&gt;
		FROZEN_HEADERS 	= 'yes' 	&lt;BR /&gt;
		FROZEN_ROWHEADERS 	= 'yes'&lt;BR /&gt;
		GRIDLINES 			= 'no' 		&lt;BR /&gt;
		AUTOFIT_HEIGHT 		= 'yes' &lt;BR /&gt;
		PRINT_FOOTER 		= 'Page: &amp;amp;P of &amp;amp;N'&lt;BR /&gt;
		WRAPTEXT			= 'yes'&lt;BR /&gt;
	)&lt;BR /&gt;
	;&lt;BR /&gt;
ODS TAGSETS.EXCELXP &lt;BR /&gt;
OPTIONS(EMBEDDED_TITLES='yes' &lt;BR /&gt;
		SHEET_INTERVAL='none' &lt;BR /&gt;
		SHEET_NAME="&amp;amp;customer_number"  &lt;BR /&gt;
		ROW_REPEAT 		= '1 - 4'&lt;BR /&gt;
		FROZEN_HEADERS 	= '1 - 4'&lt;BR /&gt;
);&lt;BR /&gt;
&lt;BR /&gt;
title;&lt;BR /&gt;
%*------ Export Main Report to EXCEL;&lt;BR /&gt;
proc report data=sashelp.shoes split='*' &lt;BR /&gt;
	style(header) =[font_size=9pt font_weight=bold font_face=Arial borderwidth=1pt cellspacing=0pt cellpadding=1pt]&lt;BR /&gt;
	style(column) =[font_size=9pt font_face=Arial borderwidth=1pt cellspacing=0pt  cellpadding=1pt]&lt;BR /&gt;
	;&lt;BR /&gt;
	columns region product; &lt;BR /&gt;
&lt;BR /&gt;
	define	region		/	display	"Region"  style(column)={outputwidth=0.5in font_face=arial };&lt;BR /&gt;
	define	product		/	display	"Product" style(column)={outputwidth=0.5in font_face=arial };&lt;BR /&gt;
run;&lt;BR /&gt;
title;&lt;BR /&gt;
&lt;BR /&gt;
%*------ CLOSE ODS TAGSETS.EXCELXP;&lt;BR /&gt;
ODS TAGSETS.EXCELXP CLOSE;&lt;BR /&gt;
ODS LISTING</description>
      <pubDate>Wed, 20 Apr 2011 10:56:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Cannot-WrapText-and-AUTOFIT-HEIGHT-in-excel/m-p/53722#M6661</guid>
      <dc:creator>SanjayM</dc:creator>
      <dc:date>2011-04-20T10:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot WrapText and AUTOFIT_HEIGHT in excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Cannot-WrapText-and-AUTOFIT-HEIGHT-in-excel/m-p/53723#M6662</link>
      <description>Hi:&lt;BR /&gt;
  When I run a version of your code, I get the following message in the log:&lt;BR /&gt;
[pre]&lt;BR /&gt;
Unrecognized option: WRAPTEXT&lt;BR /&gt;
[/pre]&lt;BR /&gt;
          &lt;BR /&gt;
and when I use the doc='Help' suboption, I do not see WRAPTEXT as a valid suboption. So, I'm not sure what to suggest there.&lt;BR /&gt;
&lt;BR /&gt;
  However, when I run a version of your program (limited to 2 regions with long values that should wrap), I DO see wrapping and the height of the cell does autofit and expand.&lt;BR /&gt;
&lt;BR /&gt;
  My recommendation would be that you open a track with Tech Support on this issue.&lt;BR /&gt;
&lt;BR /&gt;
  I ran the code below in SAS 9.2 with TAGSETS.EXCELXP version:  v1.94, 09/09/12&lt;BR /&gt;
            &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
ODS LISTING CLOSE;&lt;BR /&gt;
%let customer_number =111111;&lt;BR /&gt;
                    &lt;BR /&gt;
data shoes;&lt;BR /&gt;
  set sashelp.shoes;&lt;BR /&gt;
  ** select only some region values that should wrap;&lt;BR /&gt;
  where region in ('Western Europe', 'Central America/Caribbean');&lt;BR /&gt;
  output;&lt;BR /&gt;
  if _n_ = 1 then do;&lt;BR /&gt;
    region = 'An Extra Row';&lt;BR /&gt;
    product= 'To Repeat';&lt;BR /&gt;
    output;&lt;BR /&gt;
    output;&lt;BR /&gt;
    output;&lt;BR /&gt;
  end;&lt;BR /&gt;
run;&lt;BR /&gt;
                    &lt;BR /&gt;
proc sort data=shoes;&lt;BR /&gt;
  by region product;&lt;BR /&gt;
run;&lt;BR /&gt;
                                    &lt;BR /&gt;
** added .XLS to file name, added doc='Help' to suboptions, removed duplicate suboptions and extra ODS statement;&lt;BR /&gt;
ODS TAGSETS.EXCELXP FILE="c:\temp\wrap.xls"&lt;BR /&gt;
STYLE=styles.printer&lt;BR /&gt;
OPTIONS( doc='Help' EMBEDDED_TITLES='yes' &lt;BR /&gt;
        SHEET_INTERVAL = 'none' &lt;BR /&gt;
        WIDTH_FUDGE ='0.75' &lt;BR /&gt;
        SHEET_NAME = "&amp;amp;customer_number"&lt;BR /&gt;
        DEFAULT_COLUMN_WIDTH="10,0,8,8,8,8,8,8,8" &lt;BR /&gt;
        FITTOPAGE = 'yes'&lt;BR /&gt;
        PAGES_FITWIDTH = '1' &lt;BR /&gt;
        Pages_FitHeight = '100'&lt;BR /&gt;
        FROZEN_HEADERS = 'yes' &lt;BR /&gt;
        FROZEN_ROWHEADERS = 'yes'&lt;BR /&gt;
        GRIDLINES = 'no' &lt;BR /&gt;
        AUTOFIT_HEIGHT = 'yes' &lt;BR /&gt;
        PRINT_FOOTER = 'Page: &amp;amp;P of &amp;amp;N'&lt;BR /&gt;
        ROW_REPEAT = '1 - 4' FROZEN_HEADERS = '1 - 4'&lt;BR /&gt;
        WRAPTEXT = 'yes'  ); /* this suboption is unrecognized */&lt;BR /&gt;
                           &lt;BR /&gt;
title;                 &lt;BR /&gt;
%*------ Create Main Report in a format that EXCEL can read and render;&lt;BR /&gt;
proc report data=shoes split='*' nowd &lt;BR /&gt;
style(header) =[font_size=9pt font_weight=bold font_face=Arial borderwidth=1pt &lt;BR /&gt;
                cellspacing=0pt cellpadding=1pt]&lt;BR /&gt;
style(column) =[font_size=9pt font_face=Arial borderwidth=1pt &lt;BR /&gt;
                cellspacing=0pt cellpadding=1pt];&lt;BR /&gt;
columns region product; &lt;BR /&gt;
                  &lt;BR /&gt;
define region / display "Region" style(column)={outputwidth=0.5in font_face=arial };&lt;BR /&gt;
define product / display "Product" style(column)={outputwidth=0.5in font_face=arial };&lt;BR /&gt;
compute region;&lt;BR /&gt;
  if region = 'An Extra Row' then do;&lt;BR /&gt;
     call define(_row_,'style','style=Header');&lt;BR /&gt;
  end;&lt;BR /&gt;
endcomp;&lt;BR /&gt;
run;&lt;BR /&gt;
title;&lt;BR /&gt;
               &lt;BR /&gt;
%*------ CLOSE ODS TAGSETS.EXCELXP;&lt;BR /&gt;
ODS TAGSETS.EXCELXP CLOSE;&lt;BR /&gt;
ODS LISTING ;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Wed, 20 Apr 2011 15:36:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Cannot-WrapText-and-AUTOFIT-HEIGHT-in-excel/m-p/53723#M6662</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-04-20T15:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot WrapText and AUTOFIT_HEIGHT in excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Cannot-WrapText-and-AUTOFIT-HEIGHT-in-excel/m-p/53724#M6663</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
Yesterday i was wondering too what was exactly the problem&lt;BR /&gt;
as there is no guaranty of functionning in every cases&lt;BR /&gt;
&lt;BR /&gt;
About wraptext   it is by defaut  'yes'   in version  1.116&lt;BR /&gt;
with those  remarks about both&lt;BR /&gt;
&lt;BR /&gt;
Andre&lt;BR /&gt;
[pre]&lt;BR /&gt;
 &lt;BR /&gt;
WrapText:   Default Value 'yes' &lt;BR /&gt;
     Values: yes, no, on, off. &lt;BR /&gt;
     This value turns wraptext on and off for all style definitions. &lt;BR /&gt;
     This option should be used carefully.  Wraptext is an attribute which is part of the style &lt;BR /&gt;
     definition, specifically, the alignment part.  Turning this off will cause all style &lt;BR /&gt;
     definitions that are generated afterward, to leave out the wraptext setting.  Turning it on &lt;BR /&gt;
     and off can work provided you understand that only styles generated from an over ride will &lt;BR /&gt;
     be affected by later changes to the setting. &lt;BR /&gt;
 &lt;BR /&gt;
     This option also interacts with the tagattr wrap setting.  If wrap is the opposite of the &lt;BR /&gt;
     setting given by this option then it is treated as a style over ride, and a new style is &lt;BR /&gt;
     generated with a new alignment tag, which also contain a redefinition of the vertical and &lt;BR /&gt;
     horizontal justifications.  This interaction means that if you use these options together, &lt;BR /&gt;
     it is best to set WrapText at the very beginning and leave it alone.  Otherwise the &lt;BR /&gt;
     interaction of the options and the styles already created could get complicated. &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
 &lt;BR /&gt;
Autofit_height:   Default Value 'no' &lt;BR /&gt;
     Values: yes, no, on, off. &lt;BR /&gt;
     If yes no row heights will be specified.  This allows the auto fit height &lt;BR /&gt;
     of Excel to do it's job, sometimes not so well. &lt;BR /&gt;
[/pre]</description>
      <pubDate>Thu, 21 Apr 2011 09:55:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Cannot-WrapText-and-AUTOFIT-HEIGHT-in-excel/m-p/53724#M6663</guid>
      <dc:creator>Andre</dc:creator>
      <dc:date>2011-04-21T09:55:40Z</dc:date>
    </item>
  </channel>
</rss>

