<?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: All Charts in New Sheet on existing Excel File in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/All-Charts-in-New-Sheet-on-existing-Excel-File/m-p/761289#M21847</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/215179"&gt;@david27&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Any other alternative?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Template? GTL?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Depends on what's in that first sheet. If it's just a data table I'd import it and then re-write it out using ODS EXCEL so that the whole thing is one report.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or use VBS/VBA to combine Excel files after the fact.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Aug 2021 21:12:03 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-08-12T21:12:03Z</dc:date>
    <item>
      <title>All Charts in New Sheet on existing Excel File</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/All-Charts-in-New-Sheet-on-existing-Excel-File/m-p/761274#M21843</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the below code:&lt;/P&gt;&lt;P&gt;Problem is- It produces multiple Sheet- Chart, Chart 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;I want all charts in the same sheet- Chart.&lt;/U&gt;&lt;/P&gt;&lt;P&gt;Also,&lt;/P&gt;&lt;P&gt;This excel file that i am writing out, already has a tab named- "Data". I don't want to disturb that. I want that as is.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data temp;
infile datalines missover dsd dlm=" ";
input yyyymm pct_change1 pct_change2;
informat yyyymm yymmdd10. pct_change1 pct_change2 percent10.2;
format yyyymm yymmdd10. pct_change1 pct_change2 percent10.2;
datalines;
2020-05-01 0.74% 0.52%
2020-06-01 0.84% 0.25%
2020-07-01 0.67% 0.62%
2020-08-01 0.52% 0.24%
2020-09-01 0.56% 0.34%
2020-10-01 0.50% 0.45%
2020-11-01 0.37% 0.65%
2020-12-01 1.07% 0.95%
2021-01-01 0.38% 0.25%
2021-02-01 0.34% 0.75%
2021-03-01 0.63% 0.55%
2021-04-01 0.80% 0.68%
2021-05-01 0.71% 0.28%
;run;

%let outfile=/path/on/unix/server/tempreport.xlsx;
ods excel file="&amp;amp;outfile.";
	ods excel options(
	Sheet_name= 'Chart'
	);

%macro charting(variable=,label=,LowerRefLine=,UpperRefLine=); 
proc sgplot data = temp ;
  series x = yyyymm y = &amp;amp;variable. ;
  refline 0 &amp;amp;LowerRefLine.  &amp;amp;UpperRefLine. / axis = y ;
  xaxis label="YearMonth";
  yaxis label="&amp;amp;label.";
run;
%mend charting;
%charting(variable=pct_change1,label=Label For 1);

%charting(variable=pct_change2,label=Label For 2);
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Please advise.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 20:25:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/All-Charts-in-New-Sheet-on-existing-Excel-File/m-p/761274#M21843</guid>
      <dc:creator>david27</dc:creator>
      <dc:date>2021-08-12T20:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: All Charts in New Sheet on existing Excel File</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/All-Charts-in-New-Sheet-on-existing-Excel-File/m-p/761281#M21844</link>
      <description>Unfortunately I don't think ODS EXCEL supports writing to pre-existing Excel files.</description>
      <pubDate>Thu, 12 Aug 2021 20:44:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/All-Charts-in-New-Sheet-on-existing-Excel-File/m-p/761281#M21844</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-08-12T20:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: All Charts in New Sheet on existing Excel File</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/All-Charts-in-New-Sheet-on-existing-Excel-File/m-p/761282#M21845</link>
      <description>&lt;P&gt;Any other alternative?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Template? GTL?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 20:45:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/All-Charts-in-New-Sheet-on-existing-Excel-File/m-p/761282#M21845</guid>
      <dc:creator>david27</dc:creator>
      <dc:date>2021-08-12T20:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: All Charts in New Sheet on existing Excel File</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/All-Charts-in-New-Sheet-on-existing-Excel-File/m-p/761283#M21846</link>
      <description>&lt;P&gt;Easiest for a one-time is to write to a different Excel file and then copy the sheet to the existing.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 20:47:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/All-Charts-in-New-Sheet-on-existing-Excel-File/m-p/761283#M21846</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-08-12T20:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: All Charts in New Sheet on existing Excel File</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/All-Charts-in-New-Sheet-on-existing-Excel-File/m-p/761289#M21847</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/215179"&gt;@david27&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Any other alternative?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Template? GTL?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Depends on what's in that first sheet. If it's just a data table I'd import it and then re-write it out using ODS EXCEL so that the whole thing is one report.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or use VBS/VBA to combine Excel files after the fact.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 21:12:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/All-Charts-in-New-Sheet-on-existing-Excel-File/m-p/761289#M21847</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-08-12T21:12:03Z</dc:date>
    </item>
  </channel>
</rss>

