<?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: Exporting formulas from SAS to Excel in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-formulas-from-SAS-to-Excel/m-p/213348#M14065</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried adding in formulas='yes' to the options?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its in Tagsets.excelxp but not sure about ODS Excel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: According to page 18 it's still valid - &lt;A href="http://support.sas.com/resources/papers/proceedings14/SAS177-2014.pdf" title="http://support.sas.com/resources/papers/proceedings14/SAS177-2014.pdf"&gt;http://support.sas.com/resources/papers/proceedings14/SAS177-2014.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Jun 2015 21:46:39 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2015-06-24T21:46:39Z</dc:date>
    <item>
      <title>Exporting formulas from SAS to Excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-formulas-from-SAS-to-Excel/m-p/213347#M14064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wanted to export formulas from SAS to Excel, using ODS EXCEL.&amp;nbsp; However, the Excel file did not recognize the formulas.&amp;nbsp; It showed the formulas instead of the calculated numbers.&amp;nbsp; Does anyone know how to fix the problem?&amp;nbsp; Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below are the codes I used.&amp;nbsp; (You can run them if you have SAS 9.4.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table cars as&lt;/P&gt;&lt;P&gt;select distinct make, model, msrp, invoice&lt;/P&gt;&lt;P&gt;from sashelp.cars&lt;/P&gt;&lt;P&gt;where make = 'Audi'&lt;/P&gt;&lt;P&gt;; quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data cars_b; set cars;&lt;/P&gt;&lt;P&gt;row_num + 1;&lt;/P&gt;&lt;P&gt;if first.make then row_num = 1;&lt;/P&gt;&lt;P&gt;row_num_b = strip(put(sum(row_num,4),8.));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;diff = '='||'C'||row_num_b||'-'||'D'||row_num_b;&lt;/P&gt;&lt;P&gt;diff_b = compress(diff);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;options missing&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = ' '&lt;/P&gt;&lt;P&gt;papersize&amp;nbsp;&amp;nbsp;&amp;nbsp; = letter&lt;/P&gt;&lt;P&gt;topmargin&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0.5 in&lt;/P&gt;&lt;P&gt;leftmargin&amp;nbsp;&amp;nbsp; = 0.5 in&lt;/P&gt;&lt;P&gt;rightmargin&amp;nbsp; = 0.5 in&lt;/P&gt;&lt;P&gt;bottommargin = 1.0 in&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods excel&lt;/P&gt;&lt;P&gt;file = 'I:\1 Academic Affairs\Faculty\1 Salary\FERIP\ODS EXCEL (test)\diff_in_prices.xlsx'&lt;/P&gt;&lt;P&gt;style = normal&lt;/P&gt;&lt;P&gt;options (&lt;/P&gt;&lt;P&gt;embedded_titles&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 'yes' &lt;/P&gt;&lt;P&gt;embedded_footnotes&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 'yes'&lt;/P&gt;&lt;P&gt;print_footer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = ' '&lt;/P&gt;&lt;P&gt;center_horizontal&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 'yes'&lt;/P&gt;&lt;P&gt;absolute_column_width&amp;nbsp; = '8,30,12,12,12'&lt;/P&gt;&lt;P&gt;fittopage&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 'no'&lt;/P&gt;&lt;P&gt;pages_fitheight&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = '100'&lt;/P&gt;&lt;P&gt;orientation&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 'portrait' &lt;/P&gt;&lt;P&gt;row_repeat&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = '3-5' &lt;/P&gt;&lt;P&gt;sheet_interval&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 'none'&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;sheet_name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 'Diff'&lt;/P&gt;&lt;P&gt;merge_titles_footnotes = 'yes'&lt;/P&gt;&lt;P&gt;title_footnote_width&amp;nbsp;&amp;nbsp; = ' '&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;title1 'XXX';&lt;/P&gt;&lt;P&gt;title2 'Difference in Price';&lt;/P&gt;&lt;P&gt;proc print data = cars_b label NOOBS;&lt;/P&gt;&lt;P&gt;var make model msrp invoice diff_b;&lt;/P&gt;&lt;P&gt;label diff_b = 'Difference';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;footnote;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ods excel close;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 21:38:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-formulas-from-SAS-to-Excel/m-p/213347#M14064</guid>
      <dc:creator>RVA</dc:creator>
      <dc:date>2015-06-24T21:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting formulas from SAS to Excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-formulas-from-SAS-to-Excel/m-p/213348#M14065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried adding in formulas='yes' to the options?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its in Tagsets.excelxp but not sure about ODS Excel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: According to page 18 it's still valid - &lt;A href="http://support.sas.com/resources/papers/proceedings14/SAS177-2014.pdf" title="http://support.sas.com/resources/papers/proceedings14/SAS177-2014.pdf"&gt;http://support.sas.com/resources/papers/proceedings14/SAS177-2014.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 21:46:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-formulas-from-SAS-to-Excel/m-p/213348#M14065</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-06-24T21:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting formulas from SAS to Excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-formulas-from-SAS-to-Excel/m-p/213349#M14066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just added formulas = 'yes' to the options, but it still did not work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 21:59:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-formulas-from-SAS-to-Excel/m-p/213349#M14066</guid>
      <dc:creator>RVA</dc:creator>
      <dc:date>2015-06-24T21:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting formulas from SAS to Excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-formulas-from-SAS-to-Excel/m-p/213350#M14067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you need to use RC format not A# format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/rnd/base/ods/odsmarkup/excelxp_demo.html#formats" title="http://support.sas.com/rnd/base/ods/odsmarkup/excelxp_demo.html#formats"&gt;Base SAS: Demo: ExcelXP Tagset and Microsoft Excel&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 22:11:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-formulas-from-SAS-to-Excel/m-p/213350#M14067</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-06-24T22:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting formulas from SAS to Excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-formulas-from-SAS-to-Excel/m-p/213351#M14068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Reeza.&amp;nbsp; I used ods excelxp tagset (instead of ods excel) and RC format.&amp;nbsp; It worked now.&amp;nbsp; This is my next problem: I wanted to format the calculated column, using the dollar format.&amp;nbsp; However, SAS did not accept it as I was trying to use a numeric format to a character column.&amp;nbsp; Do you have any solutions for this?&amp;nbsp; Many thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print data = cars_b label NOOBS;&lt;/P&gt;&lt;P&gt;format diff_b dollar9.;&lt;/P&gt;&lt;P&gt;var make model msrp invoice diff_b;&lt;/P&gt;&lt;P&gt;label diff_b = 'Difference';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR: You are trying to use the numeric format DOLLAR with the character variable diff_b in data set WORK.CARS_B.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 22:28:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-formulas-from-SAS-to-Excel/m-p/213351#M14068</guid>
      <dc:creator>RVA</dc:creator>
      <dc:date>2015-06-24T22:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting formulas from SAS to Excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-formulas-from-SAS-to-Excel/m-p/213352#M14069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to add an Excel-style format not a SAS one as it is applied once the formula is calculated in Excel:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var diff_b &lt;SPAN style="line-height: 115%; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-NZ; mso-fareast-language: EN-US; mso-bidi-language: AR-SA; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi;"&gt;style=[textalign=right tagattr="format:$#,##0.00"];&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 23:04:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-formulas-from-SAS-to-Excel/m-p/213352#M14069</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2015-06-24T23:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting formulas from SAS to Excel</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-formulas-from-SAS-to-Excel/m-p/213353#M14070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 13:43:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Exporting-formulas-from-SAS-to-Excel/m-p/213353#M14070</guid>
      <dc:creator>RVA</dc:creator>
      <dc:date>2015-06-26T13:43:48Z</dc:date>
    </item>
  </channel>
</rss>

