<?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 Re: excelXP data cell wrapping in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3919#M1651</link>
    <description>I have asked our UK SAS Customer Support to obtain that code. They're searching.  The search would be easier with a tracking number for their original solution.&lt;BR /&gt;
&lt;BR /&gt;
PeterC</description>
    <pubDate>Mon, 30 Jul 2007 15:02:37 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2007-07-30T15:02:37Z</dc:date>
    <item>
      <title>excelXP data cell wrapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3909#M1641</link>
      <description>Hi&lt;BR /&gt;
&lt;BR /&gt;
I'm using the excelXP tagset. I would like to have a space after the value in tabulate data cells. They are a bit too close when printed. With data style containing   tagattr='format:#,##0" ";[Red]-#,##0" "'  I can easily add a trailing blank. However, all datacells are "wrapping" and this causes that trailing blank to be ignored.&lt;BR /&gt;
Does anyone know how to switch off the wrapping for data cells, or some alternative way to get a space between the value and the cell boundary? &lt;BR /&gt;
&lt;BR /&gt;
PeterC</description>
      <pubDate>Fri, 20 Jul 2007 10:05:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3909#M1641</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-07-20T10:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: excelXP data cell wrapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3910#M1642</link>
      <description>Peter:&lt;BR /&gt;
&lt;BR /&gt;
Had exactly the same problem.&lt;BR /&gt;
&lt;BR /&gt;
Firstly, make sure the cell with is wide enough for the value being written - we use the absolute_column_width parameter of the Excelxp tagset to set each column.&lt;BR /&gt;
&lt;BR /&gt;
If that doesn't fix the problem, then you need to turn off the wrap 'option' on the text being written to the cell.  We made a change to the ExcelXP tagset to turn off the text wrap on only the data cells and this worked.  We also received a piece of code from SAS that did the same thing by making a modification to the tagset from the program being run (using PROC TEMPLATE).&lt;BR /&gt;
&lt;BR /&gt;
As far as the print being too close to the right cell border - SAS support says that this is an Excel problem.  We tried putting the space in the format but this caused us to have problems with the alignment of the values in the cell.  (This only appears on the print, the screen view and print preview have the text further from the cell boundary).&lt;BR /&gt;
&lt;BR /&gt;
Hope this helps.</description>
      <pubDate>Fri, 20 Jul 2007 13:00:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3910#M1642</guid>
      <dc:creator>OS2Rules</dc:creator>
      <dc:date>2007-07-20T13:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: excelXP data cell wrapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3911#M1643</link>
      <description>thank you for the encouragement &lt;BR /&gt;
~ guess I'm on the right lines with absolute column width ~~~&lt;BR /&gt;
&lt;BR /&gt;
Is there any chance you would provide a link to the solutions you found ? I couldn't find them searching the forum.&lt;BR /&gt;
&lt;BR /&gt;
Peter</description>
      <pubDate>Fri, 20 Jul 2007 13:22:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3911#M1643</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-07-20T13:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: excelXP data cell wrapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3912#M1644</link>
      <description>Peter:&lt;BR /&gt;
&lt;BR /&gt;
Here is the code that was sent to us by SAS:&lt;BR /&gt;
&lt;BR /&gt;
proc template;&lt;BR /&gt;
  define tagset tagsets.test;&lt;BR /&gt;
    parent=tagsets.excelxp;&lt;BR /&gt;
      define event align_tag;&lt;BR /&gt;
        start:&lt;BR /&gt;
            break /if $align_tag;&lt;BR /&gt;
            put '&lt;ALIGNMENT&gt;
            do /if cmp($cell_class, 'systemtitle');&lt;BR /&gt;
                  put ' ss:Wraptext="0"';&lt;BR /&gt;
            else /if contains($cell_class, 'data');&lt;BR /&gt;
                  put ' ss:WrapText="0"';&lt;BR /&gt;
            else;&lt;BR /&gt;
                  put ' ss:WrapText="1"';&lt;BR /&gt;
            done;&lt;BR /&gt;
            set $align_tag "True";&lt;BR /&gt;
        finish:&lt;BR /&gt;
            break /if ^$align_tag;&lt;BR /&gt;
            putl '/&amp;gt;';&lt;BR /&gt;
            unset $align_tag;&lt;BR /&gt;
    end;&lt;BR /&gt;
 end;&lt;BR /&gt;
 run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
This code makes a change to the WrapText so that the data cells in the Excel spreadsheet do not wrap text.&lt;/ALIGNMENT&gt;</description>
      <pubDate>Mon, 23 Jul 2007 12:10:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3912#M1644</guid>
      <dc:creator>OS2Rules</dc:creator>
      <dc:date>2007-07-23T12:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: excelXP data cell wrapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3913#M1645</link>
      <description>Well....&lt;BR /&gt;
&lt;BR /&gt;
That didn't work, did it.&lt;BR /&gt;
&lt;BR /&gt;
Someone know how I can post the code without the editor f***ing it up?</description>
      <pubDate>Mon, 23 Jul 2007 12:13:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3913#M1645</guid>
      <dc:creator>OS2Rules</dc:creator>
      <dc:date>2007-07-23T12:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: excelXP data cell wrapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3914#M1646</link>
      <description>Dear Rules&lt;BR /&gt;
&lt;BR /&gt;
thank you for sharing that piece of code.  Let me return the favour, and indicate how you can format for code :&lt;BR /&gt;
&lt;BR /&gt;
try [pre]&lt;BR /&gt;
  data ;&lt;BR /&gt;
     infile ;&lt;BR /&gt;
     input ;&lt;BR /&gt;
  run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
you place [ pre ] as preceding tag and  [ /pre ] as closing tag&lt;BR /&gt;
but without the spaces embedded inside those [ ] square brackets&lt;BR /&gt;
&lt;BR /&gt;
PeterC</description>
      <pubDate>Mon, 23 Jul 2007 16:27:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3914#M1646</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-07-23T16:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: excelXP data cell wrapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3915#M1647</link>
      <description>Thanks Peter.&lt;BR /&gt;
&lt;BR /&gt;
Problem is that my code contains forward slashs and the when the editor hits the first one the rest of the code goes missing.  Even with the tags before and after.&lt;BR /&gt;
&lt;BR /&gt;
Now what ....</description>
      <pubDate>Mon, 23 Jul 2007 19:17:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3915#M1647</guid>
      <dc:creator>OS2Rules</dc:creator>
      <dc:date>2007-07-23T19:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: excelXP data cell wrapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3916#M1648</link>
      <description>here is some code with slashes inside a [ pre ] and [ /pre ] (remember that the 5 characters [ pre ] do not contain ANY spaces):&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
here's a forward slash twice / in this code snippet&lt;BR /&gt;
define something / group &lt;BR /&gt;
          style(column) = {foreground=purple};&lt;BR /&gt;
 &lt;BR /&gt;
now, here's a backslash \ just in case&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
You MUST use (pre) and (/pre) before and after the code, but where I have parentheses, you MUST use square brackets. [ ] IF your code has any greater than or less than symbols, you MUST refer to those with their named entity versions &amp;amp;lt; and &amp;amp;gt; &lt;BR /&gt;
cynthia&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Sat, 28 Jul 2007 13:12:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3916#M1648</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-07-28T13:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: excelXP data cell wrapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3917#M1649</link>
      <description>Cynthia:&lt;BR /&gt;
&lt;BR /&gt;
Thanks for the instructions, but ... &lt;BR /&gt;
&lt;BR /&gt;
I still have the formatting problem.  I followed your instructions and added the code between the tags (with the square brackets).  When I "Preview" the code, it ends at the same place as happened above, which is somewhere near the middle of the code.  &lt;BR /&gt;
&lt;BR /&gt;
I'm no expert, but methinks that there is something in the code sample that if mucking up the formatting.</description>
      <pubDate>Mon, 30 Jul 2007 12:17:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3917#M1649</guid>
      <dc:creator>OS2Rules</dc:creator>
      <dc:date>2007-07-30T12:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: excelXP data cell wrapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3918#M1650</link>
      <description>Hi,&lt;BR /&gt;
  The ONLY other thing that could mess up inside the [ pre ] section would be greater than and less than symbols. Since you're talking about a tagset that produces XML, those symbols will be all over the place and the work to protect them will be labor intensive (you'd have to turn every &amp;gt; into &amp;amp;gt; symbol and every &amp;lt; into &amp;amp;lt; symbol).&lt;BR /&gt;
 &lt;BR /&gt;
  I don't know whether there is a way to attach a file to the post messages. Otherwise, the only way to send/receive code would be for Patrick to contact Tech Support and reference your tracking number and ask for the same code or for Patrick to give you his email address and for you to email the code directly. &lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Mon, 30 Jul 2007 14:43:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3918#M1650</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-07-30T14:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: excelXP data cell wrapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3919#M1651</link>
      <description>I have asked our UK SAS Customer Support to obtain that code. They're searching.  The search would be easier with a tracking number for their original solution.&lt;BR /&gt;
&lt;BR /&gt;
PeterC</description>
      <pubDate>Mon, 30 Jul 2007 15:02:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3919#M1651</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-07-30T15:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: excelXP data cell wrapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3920#M1652</link>
      <description>Sorry for the delay:&lt;BR /&gt;
&lt;BR /&gt;
Here is the track:   Trknum: us6592415&lt;BR /&gt;
&lt;BR /&gt;
Hope that helps.</description>
      <pubDate>Mon, 30 Jul 2007 16:25:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3920#M1652</guid>
      <dc:creator>OS2Rules</dc:creator>
      <dc:date>2007-07-30T16:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: excelXP data cell wrapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3921#M1653</link>
      <description>I'm going to try the code again with Cynthia's changes:&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
proc template;&lt;BR /&gt;
  define tagset tagsets.test;&lt;BR /&gt;
    parent=tagsets.excelxp;&lt;BR /&gt;
      define event align_tag;&lt;BR /&gt;
        start:&lt;BR /&gt;
            break /if $align_tag;&lt;BR /&gt;
            put '&amp;lt;Alignment';&lt;BR /&gt;
            do /if cmp($cell_class, 'systemtitle');&lt;BR /&gt;
                  put ' ss:Wraptext="0"';&lt;BR /&gt;
            else /if contains($cell_class, 'data');&lt;BR /&gt;
                  put ' ss:WrapText="0"';&lt;BR /&gt;
            else;&lt;BR /&gt;
                  put ' ss:WrapText="1"';&lt;BR /&gt;
            done;&lt;BR /&gt;
            set $align_tag "True";&lt;BR /&gt;
        finish:&lt;BR /&gt;
            break /if ^$align_tag;&lt;BR /&gt;
            putl '/&amp;gt;';&lt;BR /&gt;
            unset $align_tag;&lt;BR /&gt;
    end;&lt;BR /&gt;
 end;&lt;BR /&gt;
 run;&lt;BR /&gt;
&lt;BR /&gt;
 ods tagsets.test file="c:\temp.txt";&lt;BR /&gt;
&lt;BR /&gt;
 proc print data=sashelp.class;&lt;BR /&gt;
 run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Hope this works...  the "preview" liked it this time.</description>
      <pubDate>Mon, 30 Jul 2007 16:29:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3921#M1653</guid>
      <dc:creator>OS2Rules</dc:creator>
      <dc:date>2007-07-30T16:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: excelXP data cell wrapping</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3922#M1654</link>
      <description>Many thanks to all who have provided the help and support : Cynthia, OS2_Rules, and some support from SAS Customer Support in UK&lt;BR /&gt;
&lt;BR /&gt;
The only proc template excelXP override which I found to work and produce valid xml, was the final code OS2_rules was able to generate. &lt;BR /&gt;
&lt;BR /&gt;
The unexpected feature I found I had to add, appears in my tabulate style code on the proc statement[pre]&lt;BR /&gt;
proc tabulate style= [ tagattr='format:#,##0"" "";[Red]-#,##0"" ""'] &lt;BR /&gt;
[/pre]&lt;BR /&gt;
(That style element affects the data cells of analysis variable statistics.)&lt;BR /&gt;
Normally we might add a trailing character in an excel custom format like&lt;BR /&gt;
[pre]          'format:#,##0" ";[Red]-#,##0" "' [/pre]&lt;BR /&gt;
However this style element gets inserted within "double quotes" and I think the interpretation of a pair of ", within a pair of " gets confused and so ignored. &lt;BR /&gt;
&lt;BR /&gt;
This was the (less effective) xml  [pre] &amp;lt;NumberFormat ss:Format="#,##0" ";[Red]-#,##0" "" /&amp;gt; [/pre]&lt;BR /&gt;
When the extra quotes are added, the result looks better, and it works for me ! [pre] &amp;lt;NumberFormat ss:Format="#,##0"" "";[Red]-#,##0"" """ /&amp;gt;[/pre]&lt;BR /&gt;
&lt;BR /&gt;
again, many thanks&lt;BR /&gt;
&lt;BR /&gt;
PeterC</description>
      <pubDate>Mon, 06 Aug 2007 15:36:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/excelXP-data-cell-wrapping/m-p/3922#M1654</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-08-06T15:36:28Z</dc:date>
    </item>
  </channel>
</rss>

