BookmarkSubscribeRSS Feed
BCNAV
Quartz | Level 8

I have a customer file that is all formatted the way we want (including some currency formats). I have written a macro that lets the user enter the customer numbers they want and the output is Excel, but only via proc export. I need to be able to ensure that ALL FORMATS (including currency) are passed through to the resulting Excel files. I also need to ensure that all column widths are 12. I am not experienced in ODS, so I'm hoping some quick code from the experts here can help me learn.

 

I had started with:

 

ods listing close;
ods html close;
goptions device=actximg;

ods excel file="\\NCRFP4\TAF\Traffic Forecasting\TFM 3.0\Refund_&custID.xlsx";
ods excel options(start_at="1,1" sheet_name="&CustID" sheet_interval="table" embedded_titles='yes');
proc print data=EGTASK.RUNWAY_&CustID noobs; run;
ods excel close;

 

 

but I don't think proc print is what is to be used as I got an out of memory error.

 

 

Also, is there a way to eliminate the report file that is made with ODS?

 

thx!

1 REPLY 1
ChrisNZ
Tourmaline | Level 20

1- Out of memory error with proc print??

How large is the table? How long are the variables?

 

2- .... a way to eliminate the report file

Like this:  ODS _all_ close;  ?

 

3- Many resources about formatting excel columns, just search.

For example: 

https://support.sas.com/rnd/base/ods/odsmarkup/TipSheet_ods_xl_xp.pdf

https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-change-the-column-width-with-ods-excel-...

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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