title: Formatting columns in exporting SAS table to Excel spreadsheet
body: <p>I am automating the exporting of a data set from SAS to Excel using <code>ODS ExcelXP</code>:</p>
  
  <pre><code>       PURCHASE_    annual_      Minimum_
  Obs       APR         fee      Cash_Advance
    1     23.45%       NONE          $10
    2     23.45%       NONE          $10
    3     23.45%       NONE          $10
    4     18.45%       NONE          $10
    5     18.45%       NONE          $10
    6     18.45%       NONE          $10
    7     23.45%       NONE          $10
    8     23.45%       NONE          $10
    9     23.45%       NONE          $10
   10     23.45%       $0
   11     23.45%       $0
   12     23.45%       $0
  </code></pre>
  
  <p>In SAS, the columns are formatted as text and I want all of the columns to be imported as text into Excel.  I've used the following code to create the file using <code>PROC REPORT</code>:</p>
  
  <pre><code>ods tagsets.ExcelXP path="H:/path"  file="file.xls" style=myStyle
                      options(frozen_headers='yes' WrapText='no'
                              embedded_titles='yes' suppress_bylines='yes'
                              sheet_interval='none' sheet_label=' ' 
                              sheet_name='Solicited'
                              width_points='1' width_fudge='1' 
                              absolute_column_width='100' autofit_height='yes' 
                              zoom='100');
  title1;
  
  proc report data=testing2 nowd;
    column purchase_APR annual_fee minimum_cash_advance;
    define purchase_APR / display style(column)={tagattr='format:@'} 'PURCHASE_APR';
    define annual_fee / display style(column)={tagattr='format:@'} 'ANNUAL_FEE';
    define minimum_cash_advance / display style(column)={tagattr='format:@'} 'MINIMUM_CASH_ADVANCE';
  run;
  
  ods tagsets.ExcelXP close;
  </code></pre>
  
  <p>However, when opening up the Excel file, the Text fields have been somehow changed from <code>23.45%</code>, <code>$0</code>, and <code>$10</code> (text) to <code>0.2345</code>, <code>0</code>, and <code>10</code> (text) respectively.</p>
  
  <p>How can I get the output in Excel to be just like the data set in SAS?</p>
  
  <p>I have tried using the specific formats to get them to look the same (i.e.<code>tagattr='format:0.00%'</code>, etc.) but the output in Excel is numeric and not text format.</p>