It's not just data that we can export to Excel and other destinations. We can also export charts. By default, when you run multiple procedures (be it for producing data or chart output) in the same ODS statement, multiple sheets are created in Excel. Use the Sheet_interval option to ensure that you get the output in the same sheet if needed:
ODS Excel File = '/folders/myfolders/Chart_Graph_Same_Page.xlsx'
Options (Sheet_interval='None');
Proc Means Data=Class;
Var Height;
Run;
Proc SGPLOT Data = Class;
Histogram Height;
Title 'Height of children in class across years';
Run;
ODS Excel Close;
This produces the following output: