<?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: Ods Excel proc report and 2 proc gchart in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Ods-Excel-proc-report-and-2-proc-gchart/m-p/505934#M17231</link>
    <description>&lt;P&gt;&lt;SPAN&gt;thank you for your answer, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ideally I try to do like this. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;can we set the columns option at the beginning?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods _all_ close;

ods excel file="H:\Report3.xlsx" options(sheet_interval="none");

proc report data =reg;
col('Men' name_m age_m sex_m Weight_m height_m) col_vide
('Women' name_f age_f sex_f Weight_f height_f);

run;


proc sgpanel data= reg;
panelby  sex_f /columns=1;

vbar age_f;


panelby  sex_m /columns=2 ;
vbar age_m;

run;
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Oct 2018 14:18:14 GMT</pubDate>
    <dc:creator>mansour_ib_sas</dc:creator>
    <dc:date>2018-10-19T14:18:14Z</dc:date>
    <item>
      <title>Ods Excel proc report and 2 proc gchart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Ods-Excel-proc-report-and-2-proc-gchart/m-p/505890#M17224</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;on the same excel page, below the proc report, I want to insert&amp;nbsp;two graphs in two columns.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I miss an option like columns = 2 for this two graphs.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Could you help me please.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data men(rename=(name=name_m age=age_m sex=sex_m Weight=Weight_m height=height_m));

do i=1 to 10;
set sashelp.class(where=(sex='M'));
i=i;
output;
end;

run;

data women(rename=(name=name_f age=age_f sex=sex_f Weight=Weight_f height=height_f));
do i=1 to 10;
set sashelp.class(where=(sex='F') );
i=i;
output;
end;
run;

data reg;
merge  men women;by i;
col_vide='';
run;


ods _all_ close;

ods excel file="H:\Report.xlsx" options(sheet_interval="none");
proc report data =reg;
col('Men' name_m age_m sex_m Weight_m height_m) col_vide
('Women' name_f age_f sex_f Weight_f height_f);

run;


goptions device=png ;

proc gchart data=reg;
   vbar age_m ;
run; quit;

proc gchart data=reg;
   vbar age_f ;
run; quit;


ods excel close;

ODS LISTING CLOSE;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Oct 2018 11:00:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Ods-Excel-proc-report-and-2-proc-gchart/m-p/505890#M17224</guid>
      <dc:creator>mansour_ib_sas</dc:creator>
      <dc:date>2018-10-19T11:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: Ods Excel proc report and 2 proc gchart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Ods-Excel-proc-report-and-2-proc-gchart/m-p/505899#M17228</link>
      <description>&lt;P&gt;Stop using the ancient gplot functions.&amp;nbsp; Look at modern programming functions like sgplot, or in your case: sgpanel:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/grstatproc/62603/HTML/default/viewer.htm#sgpanel-concepts.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/grstatproc/62603/HTML/default/viewer.htm#sgpanel-concepts.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 12:32:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Ods-Excel-proc-report-and-2-proc-gchart/m-p/505899#M17228</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-10-19T12:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Ods Excel proc report and 2 proc gchart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Ods-Excel-proc-report-and-2-proc-gchart/m-p/505934#M17231</link>
      <description>&lt;P&gt;&lt;SPAN&gt;thank you for your answer, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ideally I try to do like this. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;can we set the columns option at the beginning?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods _all_ close;

ods excel file="H:\Report3.xlsx" options(sheet_interval="none");

proc report data =reg;
col('Men' name_m age_m sex_m Weight_m height_m) col_vide
('Women' name_f age_f sex_f Weight_f height_f);

run;


proc sgpanel data= reg;
panelby  sex_f /columns=1;

vbar age_f;


panelby  sex_m /columns=2 ;
vbar age_m;

run;
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 14:18:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Ods-Excel-proc-report-and-2-proc-gchart/m-p/505934#M17231</guid>
      <dc:creator>mansour_ib_sas</dc:creator>
      <dc:date>2018-10-19T14:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: Ods Excel proc report and 2 proc gchart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Ods-Excel-proc-report-and-2-proc-gchart/m-p/505945#M17232</link>
      <description>&lt;P&gt;I am sorry, I do not understand what you mean.&amp;nbsp; You set parameters where they are expected?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 14:32:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Ods-Excel-proc-report-and-2-proc-gchart/m-p/505945#M17232</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-10-19T14:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: Ods Excel proc report and 2 proc gchart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Ods-Excel-proc-report-and-2-proc-gchart/m-p/505948#M17233</link>
      <description>&lt;P&gt;You can&amp;nbsp;only have one PANELBY in one procedure step.&amp;nbsp; It will automatically produce the number of cells needed based on the number of unique class values.&amp;nbsp; Please review the doc for PROC SGPANEL, or see many examples here:&amp;nbsp;&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/?s=sgpanel" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/?s=sgpanel&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 14:34:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Ods-Excel-proc-report-and-2-proc-gchart/m-p/505948#M17233</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2018-10-19T14:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Ods Excel proc report and 2 proc gchart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Ods-Excel-proc-report-and-2-proc-gchart/m-p/505964#M17234</link>
      <description>&lt;P&gt;Error Log:&lt;/P&gt;&lt;P&gt;ERROR: The same category variable must be used for summarized plots.&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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;data men(rename=(name=name_m age=age_m sex=sex_m Weight=Weight_m height=height_m));

do i=1 to 10;
set sashelp.class(where=(sex='M'));
i=i;
output;
end;

run;

data women(rename=(name=name_f age=age_f sex=sex_f Weight=Weight_f height=height_f));
do i=1 to 10;
set sashelp.class(where=(sex='F') );
i=i;
output;
end;
run;

data reg;
merge  men women;by i;
col_vide='';
run;


ods _all_ close;

ods excel file="H:\Report3.xlsx" options(sheet_interval="none");

proc report data =reg;
col('Men' name_m age_m sex_m Weight_m height_m) col_vide
('Women' name_f age_f sex_f Weight_f height_f);

run;


proc sgpanel data= reg;
panelby  sex_f sex_m/columns=2;
  title "Yearly Sales by Product";
  vbar age_f;

  title "Yearly Sales by Product";
  vbar age_m;
  
run;

ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Oct 2018 15:01:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Ods-Excel-proc-report-and-2-proc-gchart/m-p/505964#M17234</guid>
      <dc:creator>mansour_ib_sas</dc:creator>
      <dc:date>2018-10-19T15:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: Ods Excel proc report and 2 proc gchart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Ods-Excel-proc-report-and-2-proc-gchart/m-p/505968#M17236</link>
      <description>&lt;P&gt;Your SGPANEL code should look like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title "Yearly Sales by Product";
proc sgpanel data= sashelp.class;
panelby  sex / columns=2 novarname;
  vbar age;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Oct 2018 15:06:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Ods-Excel-proc-report-and-2-proc-gchart/m-p/505968#M17236</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-10-19T15:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: Ods Excel proc report and 2 proc gchart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Ods-Excel-proc-report-and-2-proc-gchart/m-p/505971#M17237</link>
      <description>&lt;P&gt;You need to reconsider your data structure for this graph.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=sashelp.class out=class; by sex;
run;
proc sgpanel data=class ;
panelby  sex /columns=2;
vbar age;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I suspect you could also do that for PROC REPORT and not have to split up your data but I'm not 100% sure of that.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 15:12:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Ods-Excel-proc-report-and-2-proc-gchart/m-p/505971#M17237</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-19T15:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: Ods Excel proc report and 2 proc gchart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Ods-Excel-proc-report-and-2-proc-gchart/m-p/505979#M17240</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I thought about this option.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I consider that the subject is closed&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 15:23:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Ods-Excel-proc-report-and-2-proc-gchart/m-p/505979#M17240</guid>
      <dc:creator>mansour_ib_sas</dc:creator>
      <dc:date>2018-10-19T15:23:25Z</dc:date>
    </item>
    <item>
      <title>Re: Ods Excel proc report and 2 proc gchart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Ods-Excel-proc-report-and-2-proc-gchart/m-p/505980#M17241</link>
      <description>&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 15:24:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Ods-Excel-proc-report-and-2-proc-gchart/m-p/505980#M17241</guid>
      <dc:creator>mansour_ib_sas</dc:creator>
      <dc:date>2018-10-19T15:24:22Z</dc:date>
    </item>
  </channel>
</rss>

