<?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: Write SAS data to a specific excel cell in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Write-SAS-data-to-a-specific-excel-cell/m-p/559653#M156312</link>
    <description>&lt;P&gt;This isn't elegant, but you could brute force it with something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let value=201902;
data temp;
	length a b c d e 8.;
	output; *row 1;
	output; *row 2;
	e=&amp;amp;value;
	output; *row 3;
run;
proc export data=temp
	outfile="path\temp.xlsx"
	dbms=xlsx
	replace;
	putnames=no; *no header row;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 17 May 2019 13:03:48 GMT</pubDate>
    <dc:creator>noling</dc:creator>
    <dc:date>2019-05-17T13:03:48Z</dc:date>
    <item>
      <title>Write SAS data to a specific excel cell</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Write-SAS-data-to-a-specific-excel-cell/m-p/558246#M155788</link>
      <description>&lt;P&gt;data _null_;&lt;BR /&gt;call symput('period',put(intnx('month',today(),-3),yymmn6.));&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;May I know how to write the 'period' (201902) into a specific cell in Excel? Let say to cell E3.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 09:51:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Write-SAS-data-to-a-specific-excel-cell/m-p/558246#M155788</guid>
      <dc:creator>scb</dc:creator>
      <dc:date>2019-05-13T09:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Write SAS data to a specific excel cell</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Write-SAS-data-to-a-specific-excel-cell/m-p/558345#M155824</link>
      <description>You can't. You can export a data set but that will add the column header. I don't believe there's a way to have a single value put to a cell besides other alternatives that are well documented on here. DDE was the old method which still technically works but I would never recommend building anything relying on that technology.</description>
      <pubDate>Mon, 13 May 2019 15:50:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Write-SAS-data-to-a-specific-excel-cell/m-p/558345#M155824</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-05-13T15:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Write SAS data to a specific excel cell</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Write-SAS-data-to-a-specific-excel-cell/m-p/559648#M156311</link>
      <description>&lt;P&gt;Use SAS/IML to call R&lt;/P&gt;&lt;P&gt;Pass your data to R via SAS/IML&lt;/P&gt;&lt;P&gt;Pass R code to R via SAS/IML to do the writing to Excel for you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use the openxlsx or XLConnect R packages to do the excel writing in R&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(Not a great answer I know. the only SAS-program driven solution I've been able to find. The other solutions involve writing VBA code in Excel to pull data into excel versus pushing data to excel from a SAS program.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See this paper for example code to get you started:&lt;/P&gt;&lt;P&gt;&lt;A href="https://analytics.ncsu.edu/sesug/2017/SESUG2017_Paper-109_Final_PDF.pdf" target="_blank"&gt;https://analytics.ncsu.edu/sesug/2017/SESUG2017_Paper-109_Final_PDF.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2019 14:45:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Write-SAS-data-to-a-specific-excel-cell/m-p/559648#M156311</guid>
      <dc:creator>DWilson</dc:creator>
      <dc:date>2019-05-17T14:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: Write SAS data to a specific excel cell</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Write-SAS-data-to-a-specific-excel-cell/m-p/559653#M156312</link>
      <description>&lt;P&gt;This isn't elegant, but you could brute force it with something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let value=201902;
data temp;
	length a b c d e 8.;
	output; *row 1;
	output; *row 2;
	e=&amp;amp;value;
	output; *row 3;
run;
proc export data=temp
	outfile="path\temp.xlsx"
	dbms=xlsx
	replace;
	putnames=no; *no header row;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 May 2019 13:03:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Write-SAS-data-to-a-specific-excel-cell/m-p/559653#M156312</guid>
      <dc:creator>noling</dc:creator>
      <dc:date>2019-05-17T13:03:48Z</dc:date>
    </item>
  </channel>
</rss>

