BookmarkSubscribeRSS Feed
GeorgeSAS
Lapis Lazuli | Level 10

Hello All,

 

I want to use proc export in base SAS to generate excel file from SAS dataset.

 

Is that possible I can generate an excel file with cell function in it from SAS. such as  a cell with function "=SUM(A1:A8)"   ?

 

all that need be done in SAS.

 

Thanks!

1 REPLY 1
RW9
Diamond | Level 26 RW9
Diamond | Level 26

You can apply tagattr statements to things, for not only formats but to apply formulas:

style={tagattr='format:Currency formula:RC[-1]-RC[-2]'};

Taken from this page:

https://support.sas.com/rnd/base/ods/odsmarkup/excelxp_demo.html 

 

I would however ask why, SAS can do any of the functionality of Excel so why not jsut do it in SAS and export it.  If you using Excel as a tool to do other things, then use Excel to build the tool, and pull in output CSV which is exported by SAS.  Don't try to drive one application with another, just pass data between them.

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