I have sas table called: EXPOSURE, I want to write a program in sas to export it to excel hidden sheet called 'premium' and want to create a pivot as shown below.
It should also show the list of value in filter drop down.
MAPPED_COVRG | (All) | |||
RISK_STATE_CD | (All) | |||
YQTR | Sum of EARNED_EXPOSURE | Sum of WRITTEN_EXPOSURE | Sum of WRITTEN_PREMIUM | Sum of EARNED_PREMIUM |
2006Q1 | 72,538 | 81,953 | 19,952,490 | 17,344,365 |
2006Q2 | 80,291 | 105,219 | 25,223,946 | 19,261,388 |
2006Q3 | 89,390 | 107,191 | 25,492,690 | 21,529,784 |
2006Q4 | 97,905 | 112,642 | 27,227,132 | 23,607,847 |
2007Q1 | 105,448 | 123,325 | 29,741,038 | 25,450,573 |
This isn't a trivial task.
If you search on here you'll find some solutions for this situation, but the main issues are
1) export to specific location
2) create/update pivot table
A common work around is to create a template that is updated, source data replaced and there's an embedded Excel macro that refreshes the pivot table. Given that your using EG, you can't use DDE. Can you use an Excel macro? How are you envisioning this process working on your side?
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.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.