<?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: fill an Excel Template in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/fill-an-Excel-Template/m-p/513895#M21999</link>
    <description>&lt;P&gt;Some questions:&lt;/P&gt;
&lt;P&gt;What operating system are you using?&lt;/P&gt;
&lt;P&gt;Are you running SAS on your computer or via a server?&lt;/P&gt;
&lt;P&gt;Did you run (compile) the macro before calling it?&lt;/P&gt;
&lt;P&gt;What code did you submit to run the macro?&lt;/P&gt;
&lt;P&gt;What did your log say?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Nov 2018 14:38:43 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2018-11-16T14:38:43Z</dc:date>
    <item>
      <title>fill an Excel Template</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/fill-an-Excel-Template/m-p/186856#M12885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi to all,&lt;/P&gt;&lt;P&gt;I have a Template in Excel, and I would like to fill the Excel's cell from SAS data set...&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;what should I do?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;which approach do you suggest to me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 20:14:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/fill-an-Excel-Template/m-p/186856#M12885</guid>
      <dc:creator>Rakeon</dc:creator>
      <dc:date>2014-09-04T20:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: fill an Excel Template</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/fill-an-Excel-Template/m-p/186857#M12886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi: There are a couple of approaches that my students have described:&lt;/P&gt;&lt;P&gt;1) write a CSV file with SAS to populate the Excel template and have the template get the CSV file as input&lt;/P&gt;&lt;P&gt;2) use DDE to populate the template cells based on the SAS data&lt;/P&gt;&lt;P&gt;3) depending on what your template is doing, redesign your process and have the output created by ODS -- for example, if your template is only performing cosmetics or sums, do those things in SAS/ODS using style overrides and procedure options and then allow ODS to create the output file without using an Excel template.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; #1 and #2 approaches still have you with one foot in the Excel world and 1 foot in the SAS world for file creation/maintenance. #3 approach has you in the SAS world entirely for creation and in the Excel world for viewing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 23:37:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/fill-an-Excel-Template/m-p/186857#M12886</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2014-09-04T23:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: fill an Excel Template</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/fill-an-Excel-Template/m-p/186858#M12887</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Download the free macro from: &lt;A href="http://www.sascommunity.org/wiki/A_Poor/Rich_SAS_Users_Proc_Export" title="http://www.sascommunity.org/wiki/A_Poor/Rich_SAS_Users_Proc_Export"&gt;A Poor/Rich SAS Users Proc Export - sasCommunity&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How you would use the macro depends upon how complicated the task is. E.g., the following code would copy sashelp.class names, sex and height, using a template called template, to new workbook called "class_stats", create a sheet called Sept_2014, and starting the data at a range beginning at cell a2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%exportxl(data=sashelp.class (keep=name sex height), &lt;/P&gt;&lt;P&gt; template=c:\art\Template.xltx, &lt;/P&gt;&lt;P&gt; templatesheet=Template, &lt;/P&gt;&lt;P&gt; outfile=c:\art\class_stats.xlsx, &lt;/P&gt;&lt;P&gt; sheet=Sept_2014, &lt;/P&gt;&lt;P&gt; type=N, &lt;/P&gt;&lt;P&gt; usenames=no, &lt;/P&gt;&lt;P&gt; range=A2) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly, the following code would modify the existing sheet, adding Weight to a range beginning at cell I2:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%exportxl(data=sashelp.class (keep=weight), &lt;/P&gt;&lt;P&gt; outfile=c:\art\class_stats.xlsx, &lt;/P&gt;&lt;P&gt; sheet=Sept_2014,&lt;/P&gt;&lt;P&gt; type=M, &lt;/P&gt;&lt;P&gt; usenames=no, &lt;/P&gt;&lt;P&gt; range=I2) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Sep 2014 00:58:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/fill-an-Excel-Template/m-p/186858#M12887</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-09-05T00:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: fill an Excel Template</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/fill-an-Excel-Template/m-p/186859#M12888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Note: After noticing an error in the code I just updated the exportxl macro. Like before, the macro (and paper) can be downloaded at: &lt;A href="http://www.sascommunity.org/wiki/A_Poor/Rich_SAS_Users_Proc_Export" title="http://www.sascommunity.org/wiki/A_Poor/Rich_SAS_Users_Proc_Export"&gt;A Poor/Rich SAS Users Proc Export - sasCommunity&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Sep 2014 20:09:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/fill-an-Excel-Template/m-p/186859#M12888</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-09-06T20:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: fill an Excel Template</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/fill-an-Excel-Template/m-p/186860#M12889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another simple method is to create a extra tab in your worksheet and include the data there in a named range. Link the formatted areas of the excel sheet to the named range data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then export to the named range using a standard export procedure and the data will be updated. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Sep 2014 01:10:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/fill-an-Excel-Template/m-p/186860#M12889</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-09-07T01:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: fill an Excel Template</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/fill-an-Excel-Template/m-p/186861#M12890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;Reeza wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Another simple method is to create a extra tab in your worksheet and include the data there in a named range. Link the formatted areas of the excel sheet to the named range data.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Then export to the named range using a standard export procedure and the data will be updated.&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;Reeza,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do you mean by "standard export procedure"? Is that a proc export? If so, how do I specify the named range? Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2015 04:30:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/fill-an-Excel-Template/m-p/186861#M12890</guid>
      <dc:creator>DanD</dc:creator>
      <dc:date>2015-04-09T04:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: fill an Excel Template</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/fill-an-Excel-Template/m-p/186862#M12891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's a link to a presentation I did on the topic which includes some sample code.&amp;nbsp; The presentation isn't really standalone, but should get you started. Make sure to review the drawbacks slide - this won't work in all cases. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sas.com/content/dam/SAS/en_ca/User%20Group%20Presentations/Edmonton-User-Group/FareezaKhurshed-CoordinateComplexReports-Spring2014.pdf" title="http://www.sas.com/content/dam/SAS/en_ca/User%20Group%20Presentations/Edmonton-User-Group/FareezaKhurshed-CoordinateComplexReports-Spring2014.pdf"&gt;http://www.sas.com/content/dam/SAS/en_ca/User%20Group%20Presentations/Edmonton-User-Group/FareezaKhurshed-CoordinateComplexReports-Spring2014.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2015 15:30:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/fill-an-Excel-Template/m-p/186862#M12891</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-04-09T15:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: fill an Excel Template</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/fill-an-Excel-Template/m-p/186863#M12892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;Reeza wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Here's a link to a presentation I did on the topic which includes some sample code.&amp;nbsp; The presentation isn't really standalone, but should get you started. Make sure to review the drawbacks slide - this won't work in all cases.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.sas.com/content/dam/SAS/en_ca/User%20Group%20Presentations/Edmonton-User-Group/FareezaKhurshed-CoordinateComplexReports-Spring2014.pdf"&gt;http://www.sas.com/content/dam/SAS/en_ca/User%20Group%20Presentations/Edmonton-User-Group/FareezaKhurshed-CoordinateComplexReports-Spring2014.pdf&lt;/A&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana','sans-serif'; color: #1f497d;"&gt;I was able to do what I wanted using proc export like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: green; background: white;"&gt;/*&amp;nbsp;&amp;nbsp;&amp;nbsp; export the data for the provider to a spreadsheet */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; proc export data=&amp;amp;provider&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; file=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;"&amp;amp;prgdata./&amp;amp;provider._test.xlsx"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; dbms=xlsx replace;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; sheet=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'Template'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Verdana','sans-serif'; color: #1f497d;"&gt;I think this is new in 9.4. I will look at your presentation, though. I'm sure I'll learn something new. Thanks for the reply.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2015 17:58:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/fill-an-Excel-Template/m-p/186863#M12892</guid>
      <dc:creator>DanD</dc:creator>
      <dc:date>2015-04-09T17:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: fill an Excel Template</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/fill-an-Excel-Template/m-p/512953#M21981</link>
      <description>&lt;P&gt;I tried this macro and it didn't work.&lt;/P&gt;&lt;P&gt;I doesn't run at all?&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 14:36:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/fill-an-Excel-Template/m-p/512953#M21981</guid>
      <dc:creator>raindrops</dc:creator>
      <dc:date>2018-11-14T14:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: fill an Excel Template</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/fill-an-Excel-Template/m-p/513883#M21998</link>
      <description>DDE Approach: This will write data from ‘sasfile’ called in a template called ‘report’, starting at row 10 column 3 or the template to row 324 column 11. Write variables “height (weight name age class Injury)” and save as “final_report” in same location as template. ____________ options noxwait noxsync; x "'template path\report.xlsx'"; data _null_; x=sleep(1); run; filename report dde "excel|templatepath\[report.xlsx]new ICD10!r10c3:r324c11" notab recfm=v LRECL=500; data _null_; set sasfile; file report ; put height (weight name age class Injury) ('09'x); run; data _null_; x=sleep(1); run; filename cmp dde 'Excel|System'; data _null_; file cmp; put %unquote(%str(%'[SAVE.as("template path\final_Report.xlsx")]%')); put '[QUIT()]'; run;</description>
      <pubDate>Fri, 16 Nov 2018 14:07:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/fill-an-Excel-Template/m-p/513883#M21998</guid>
      <dc:creator>raindrops</dc:creator>
      <dc:date>2018-11-16T14:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: fill an Excel Template</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/fill-an-Excel-Template/m-p/513895#M21999</link>
      <description>&lt;P&gt;Some questions:&lt;/P&gt;
&lt;P&gt;What operating system are you using?&lt;/P&gt;
&lt;P&gt;Are you running SAS on your computer or via a server?&lt;/P&gt;
&lt;P&gt;Did you run (compile) the macro before calling it?&lt;/P&gt;
&lt;P&gt;What code did you submit to run the macro?&lt;/P&gt;
&lt;P&gt;What did your log say?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Nov 2018 14:38:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/fill-an-Excel-Template/m-p/513895#M21999</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-11-16T14:38:43Z</dc:date>
    </item>
  </channel>
</rss>

