Hi Everyone! Below is one of the challenge im facing now.
Existing scenario:
There is Excel template file placed in common folder. This template file contains two sheets (sheet1, sheet2).
Both the sheets contains only Variable Names but no records. Also this Template sheet have Footer information which will be displayed only when we do PRINT PREVIEW of excel.
Current SAS Code using DDE concept and this template file, writes work dataset data to 2nd sheet of template (not in Sheet1)
After exporting SAS data to excel using above DDE concept, this file will be stored to another Folder with another name with datestamp.
Now the output excel file contains
two sheets ( sheet1 - only variables ,no data ; Sheet2 - both variables and data records) .
Also contains Footer information.
Expected Scenario:
I need to achieve above scenario without USING DDE CONCEPT in SAS ENTERPRISE GUIDE (version: 9.04.01M2P07232014)
I can do this using PROC EXPORT or ODS EXCEL.
but the challange im facing is
1) In PROC EXPORT, i can export empty dataset data to sheet1 and data to sheet2 BUT i cant include/define FOOTER information.
2) In ODS EXCEL, i can include/define FOOTER information BUT i can't export empty dataset data to sheet1.
HOW TO ACHIEVE THIS. PLEASE HELP ME
Hi:
But you said that sheet one is not really empty -- it has the variable names, correct? Are the variable names in row 1? Then sheet 2 has the "real" data. Since you are using SAS 9.4 M2, I would recommend using ODS EXCEL. You'll have to write code to do what you want to do.
Cynthia
This is what I envision you are describing:
The above output was generated with this code:
What version of SAS are you using? Option 2 should work with the latest version, but that may be 9.4 M6.
But you can also export your data to a template file that already has the footnote/titles you need or use VB to add it after the fact. T
Hi, i m using SAS ENTERPRISE GUIDE (version: 9.04.01M2P07232014)
Hi:
But you said that sheet one is not really empty -- it has the variable names, correct? Are the variable names in row 1? Then sheet 2 has the "real" data. Since you are using SAS 9.4 M2, I would recommend using ODS EXCEL. You'll have to write code to do what you want to do.
Cynthia
This is what I envision you are describing:
The above output was generated with this code:
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.