DATA Step, Macro, Functions and more

How to export to excel with excel functional cell?

Reply
Regular Contributor
Posts: 241

How to export to excel with excel functional cell?

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!

Super User
Super User
Posts: 7,942

Re: How to export to excel with excel functional cell?

Posted in reply to GeorgeSAS

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.

Ask a Question
Discussion stats
  • 1 reply
  • 174 views
  • 0 likes
  • 2 in conversation