BookmarkSubscribeRSS Feed
Ronein
Onyx | Level 15

Hello

I am running ods excel and also send it to email.

The XLSX sheets layout  is from left to right and i want to change to right to left.

What is the way to do it?


%let Reportpath="/usr/local/SAS/SASUsers/LabRet/UserDir/udclk79/MYCARS.xlsx";


ods excel file=&Reportpath. 
options  (sheet_name='REPORT1'
embedded_titles='yes' 
embedded_footnotes='yes'
sheet_interval="proc"   /***One table in sheet**/
gridlines = 'yes'
tab_color="YELLOW"
);
proc report data=sashelp.cars contents="Honda Cars";
	  where Make="Honda";
	  column ("Car" make model) ("Cost" msrp invoice) 
           ("Fuel Efficiency" mpg_city mpg_highway);  
run;

ods excel options (sheet_name='REPORTS2'  
sheet_interval="proc"  /**One table in sheet***/
gridlines = 'yes'
tab_color="YELLOW"
);
proc report data=sashelp.cars contents="All Cars" 
spanrows; /* 2 */
	define Make / order;
	define Model / order;                       
	column Make Model MSRP MPG_City Horsepower;
run;

ods excel close;

/****SEND EMAIL****/
/****SEND EMAIL****/
FILENAME mail EMAIL 
from="Ron.Dave@gmail.com"
TO=("Ron.Dave@gmail.com")
SUBJECT="CAR REPORTS"
encoding='utf-8'  /**To show Hebrew!!!**/
CONTENT_TYPE="text/plain" 
attach=(&Reportpath. content_type="excel");
ODS LISTING CLOSE;
/*ODS HTML BODY=mail;*/

data _null_;
file mail;
put 'HELLO';
put 'ATTACH FILE';
put ' ';
put ' ';
put ' ';
put 'REGARDS';
run;

 

1 REPLY 1

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 397 views
  • 0 likes
  • 2 in conversation