Hello,
I have an existing Excel workbook with various sheets, all of which have integrated formatted Excel tables as templates. Is there now a way to export SAS data sets to specific cells in an Excel table?
My current knowledge:
Proc Export: No range possible
ODS Excel: ALWAYS completely overwrites existing Excel sheets.
Is there a newer solution?
Many thanks!
Jan
I don't know of any way to do this. However, why not just export the data to a separate sheet (in the same workbook) and have either Excel formulas or a VBA macro that reads from that sheet to populate the range/s of interest? Seems much less prone to disaster.
I work in a larger organization and we have the requirement to convert all VBA programs to SAS 😉
Can't blame them - VBA is painful. Maybe other folks will have ideas to do specifically what you asked. It might help if you describe the structure of the target Excel sheet. Is it a dashboard of some sort? Is it reading data from other sheets in the same workbook or from an external source? Is it interactive?
@JanJansen wrote:
I work in a larger organization and we have the requirement to convert all VBA programs to SAS 😉
Then just create the WHOLE worksheet from SAS, not just some part of it.
There are some static sheets with hyperlinks and links to different workbook sheets - can SAS handle this?
I don't just need data tables, but "real" Excel tables (with table names, alternative text, etc.) - can SAS do that?
Sorry - was on vacation.
I can add a name and an alt text to a formatted excel tabelle for a barrier-free reading. This is what I need.
Looks interesting, I'll try this next days. Thanks!
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.