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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 283 views
  • 0 likes
  • 2 in conversation