BookmarkSubscribeRSS Feed
JanJansen
Calcite | Level 5

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

9 REPLIES 9
quickbluefish
Barite | Level 11

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.  

JanJansen
Calcite | Level 5

I work in a larger organization and we have the requirement to convert all VBA programs to SAS 😉

quickbluefish
Barite | Level 11

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?

Tom
Super User Tom
Super User

@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.

JanJansen
Calcite | Level 5

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?

Cynthia_sas
Diamond | Level 26
Hi: Can you clarify what you mean by table names and alternative text -- do you mean custom sheet names or possibly flyover text when a cell is clicked in?
Cynthia
JanJansen
Calcite | Level 5

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.

JanJansen
Calcite | Level 5

Looks interesting, I'll try this next days. Thanks!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 9 replies
  • 1424 views
  • 3 likes
  • 5 in conversation