<?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 – Need column to all be text. in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ExcelXP-Need-column-to-all-be-text/m-p/3880#M1633</link>
    <description>The syntax for PROC PRINT is pretty much the same as REPORT.&lt;BR /&gt;
&lt;BR /&gt;
proc print data=xyz STYLE(column)=[tagattr='format:@'];&lt;BR /&gt;
or you can put the style after a VAR statement (much like the DEFINE)&lt;BR /&gt;
&lt;BR /&gt;
VAR x /STYLE(column)=[tagattr='format:@'];&lt;BR /&gt;
&lt;BR /&gt;
What I'm unsure of is the "format:@" syntax - this might be in the a later edition of the tagset. I used to use (for numbers) "#,###.00"&lt;BR /&gt;
&lt;BR /&gt;
This you can lookup by submitting ODS TAGSETS.EXCELXP FILE='test.xml' DATA='test.ini' OPTIONS(doc='Help');&lt;BR /&gt;
using the appropriate file and data values.&lt;BR /&gt;
&lt;BR /&gt;
The (column) could be other elements as well - HEADER DATA BYLABEL are a couple - these are documented in the online manual (this is a handy bookmark to make) under both PRINT and REPORT.&lt;BR /&gt;
&lt;BR /&gt;
Just noticed that instead of column in proc print, you would use data. print doesn't have a column location.

Message was edited by: rwright</description>
    <pubDate>Thu, 19 Jul 2007 18:46:01 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2007-07-19T18:46:01Z</dc:date>
    <item>
      <title>ExcelXP – Need column to all be text.</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ExcelXP-Need-column-to-all-be-text/m-p/3877#M1630</link>
      <description>I have just started to learn about ExcelXP.  &lt;BR /&gt;
&lt;BR /&gt;
The code I’m using.&lt;BR /&gt;
   ods listing close ;&lt;BR /&gt;
   ods path sashelp.tmplmst(read);&lt;BR /&gt;
   ods tagsets.ExcelXP file="tsp_01.xml" style=Statistical ;&lt;BR /&gt;
      proc print data=work.temp01 noobs ;&lt;BR /&gt;
         id var1 ;&lt;BR /&gt;
         by var1 ;&lt;BR /&gt;
         run ;&lt;BR /&gt;
   ods tagsets.ExcelXP close ;&lt;BR /&gt;
   ods listing ;&lt;BR /&gt;
&lt;BR /&gt;
The problem I haven’t been able to find a fix for is the second variable in my dataset is a mixture of numbers and characters so when I input the file into excel some of the variable’s in the column move to the right and the others move to the left.  I would like all the values in that column to be characters.  How do you do this?&lt;BR /&gt;
&lt;BR /&gt;
Thank you.&lt;BR /&gt;
Timothy</description>
      <pubDate>Thu, 19 Jul 2007 15:11:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ExcelXP-Need-column-to-all-be-text/m-p/3877#M1630</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-07-19T15:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: ExcelXP – Need column to all be text.</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ExcelXP-Need-column-to-all-be-text/m-p/3878#M1631</link>
      <description>Hi:&lt;BR /&gt;
&lt;BR /&gt;
You need to add an Excel tag using the STYLE options to format the variable on the spreadsheet.&lt;BR /&gt;
&lt;BR /&gt;
I'm not exactly sure how to do it in PROC PRINT, but here is how I do it with PROC REPORT (where we have VAR2 as both numeric and text):&lt;BR /&gt;
&lt;BR /&gt;
proc report  nowd split='*'  box;                                                                                                       &lt;BR /&gt;
column  var1                                                                                                                            &lt;BR /&gt;
        var2                                                                                                                            &lt;BR /&gt;
        var3;                                                                                                                           &lt;BR /&gt;
                                                                                                                                        &lt;BR /&gt;
define  var1  / display  'VAR1' ;                                                                                                       &lt;BR /&gt;
define  var2  / display  'VAR2'  style(column)=[tagattr='format:@'];                                                                    &lt;BR /&gt;
define  var3  / display  'VAR3' ;                                                                                                       &lt;BR /&gt;
                                                                                                                                        &lt;BR /&gt;
run;          &lt;BR /&gt;
&lt;BR /&gt;
You an find the STYLE options in PROC PRINT chapter of the online DOC.</description>
      <pubDate>Thu, 19 Jul 2007 15:31:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ExcelXP-Need-column-to-all-be-text/m-p/3878#M1631</guid>
      <dc:creator>OS2Rules</dc:creator>
      <dc:date>2007-07-19T15:31:02Z</dc:date>
    </item>
    <item>
      <title>Re: ExcelXP – Need column to all be text.</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ExcelXP-Need-column-to-all-be-text/m-p/3879#M1632</link>
      <description>Thanks for the help.&lt;BR /&gt;
&lt;BR /&gt;
I tried using PROC REPORT and something strange happened, all the values turned to 0.  The column only has 1 character per cell either alpha or numeric but now it only show 0's.&lt;BR /&gt;
&lt;BR /&gt;
I also found the same style option in the PROC PRINT document and tried it as well and it had the same problem.

I did find the following while looking through the XML file.&lt;BR /&gt;
&lt;ROW autofitheight="1" styleid="Table"&gt;&lt;BR /&gt;
&lt;CELL styleid="RowHeader" index="1"&gt;&lt;DATA type="String"&gt;&lt;/DATA&gt;&lt;/CELL&gt;&lt;BR /&gt;
&lt;CELL styleid="TEST_Data_manual1_1" formula="0" index="2"&gt;&lt;DATA type="String"&gt;N&lt;/DATA&gt;&lt;/CELL&gt;&lt;BR /&gt;
&lt;CELL styleid="TEST_PCT_manual2_1" formula="0" index="3"&gt;&lt;DATA type="Number"&gt;0.97463&lt;/DATA&gt;&lt;/CELL&gt;&lt;BR /&gt;
&lt;/ROW&gt;&lt;BR /&gt;
&lt;BR /&gt;
I removed ss:Formula="0" from the XML file and reloaded the file into Excel and it displayed correctly.  Does any one know why or how that ss:Formula="0" was added to the XML file, it appears to be what is causing the problem.&lt;BR /&gt;
&lt;BR /&gt;
Thanks.&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: TSP</description>
      <pubDate>Thu, 19 Jul 2007 15:51:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ExcelXP-Need-column-to-all-be-text/m-p/3879#M1632</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-07-19T15:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: ExcelXP – Need column to all be text.</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ExcelXP-Need-column-to-all-be-text/m-p/3880#M1633</link>
      <description>The syntax for PROC PRINT is pretty much the same as REPORT.&lt;BR /&gt;
&lt;BR /&gt;
proc print data=xyz STYLE(column)=[tagattr='format:@'];&lt;BR /&gt;
or you can put the style after a VAR statement (much like the DEFINE)&lt;BR /&gt;
&lt;BR /&gt;
VAR x /STYLE(column)=[tagattr='format:@'];&lt;BR /&gt;
&lt;BR /&gt;
What I'm unsure of is the "format:@" syntax - this might be in the a later edition of the tagset. I used to use (for numbers) "#,###.00"&lt;BR /&gt;
&lt;BR /&gt;
This you can lookup by submitting ODS TAGSETS.EXCELXP FILE='test.xml' DATA='test.ini' OPTIONS(doc='Help');&lt;BR /&gt;
using the appropriate file and data values.&lt;BR /&gt;
&lt;BR /&gt;
The (column) could be other elements as well - HEADER DATA BYLABEL are a couple - these are documented in the online manual (this is a handy bookmark to make) under both PRINT and REPORT.&lt;BR /&gt;
&lt;BR /&gt;
Just noticed that instead of column in proc print, you would use data. print doesn't have a column location.

Message was edited by: rwright</description>
      <pubDate>Thu, 19 Jul 2007 18:46:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ExcelXP-Need-column-to-all-be-text/m-p/3880#M1633</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-07-19T18:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: ExcelXP – Need column to all be text.</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ExcelXP-Need-column-to-all-be-text/m-p/3881#M1634</link>
      <description>I use tagattr='format:text' but it is probably the same as the @ option.&lt;BR /&gt;
&lt;BR /&gt;
One difficulty with text is that the word wrapping does not work on the latest version of the ExcelXP tagset (June 2007). I had to edit it to make it work properly. It's got something to do with the additional __r __c and __l elements not inheriting parent attributes, so I removed those DEFINEs, which are new to this version of the tagset compared to the previous one.

Message was edited by: Roddy</description>
      <pubDate>Wed, 12 Sep 2007 09:02:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ExcelXP-Need-column-to-all-be-text/m-p/3881#M1634</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-09-12T09:02:35Z</dc:date>
    </item>
  </channel>
</rss>

