Hi Developers,
I originally posted this question on the SAS Blogs site:
The author suggested that I post here as well.
My company has a series of Viya dashboards that we are currently importing into Powerpoint using the SAS MS Office Add In. The process is very labor intensive and sometimes gets stuck if network traffic is high. Also, the data doesn't always line up correctly and requires lots of manual adjustment.
I'd like to export these reports from Viya using API calls. Ideally, we'd be able to use a pre-existing Powerpoint template, but I'll settle for just the export. I've already found API calls that will return the report name, id, path, and other data elements. But exporting the text and images is another matter.
One of the dashboards in question has parameters. So I was hoping to pass, for example, a health plan id to the dashboard, run it, and then export the results. Any input would be welcome.
Rick Medlin
Hi @rmedlin,
Sorry for the delayed response. Hopefully, you'll find this helpful.
First, I know you're working with ppt here, but you may want to look into the VA SDK. Perhaps there are some nuggets you could pull from there for your reports? There is also the JobExecution web application. Again, not exactly fitting your use case, but it may be a direction you wish to explore. There is a TON of examples of the JES here in the Community.
Moving on, I worked with @lucasdepaula and we dug up some code from @BrunoMueller. The result is a SAS program which exports SAS report objects and creates a PowerPoint file. I loaded the code onto GitHub so it would be available to everyone. I'm still working on usage notes, but it may be a good test to see what's clear (and not) in it's current state.
Please take a look and let me know if you need further guidance to get the code working. Lucas and I are available to walk you through it.
Thanks,
Joe
Join us for SAS Community Trivia
SAS Bowl XLIII, The New SAS Developer Portal
Wednesday, August 14, 2024, at 10 a.m. ET | #SASBowl
Hi @rmedlin,
I wanted to provide an update.
I'm working through this with a couple of colleagues. We're close to completing a solution, but have a couple more things to iron out. I'll provide an update when we've got something working end-to-end.
Join us for SAS Community Trivia
SAS Bowl XLIII, The New SAS Developer Portal
Wednesday, August 14, 2024, at 10 a.m. ET | #SASBowl
Just poking this thread to see if there are any updates.
Hi @rmedlin,
Sorry for the delayed response. Hopefully, you'll find this helpful.
First, I know you're working with ppt here, but you may want to look into the VA SDK. Perhaps there are some nuggets you could pull from there for your reports? There is also the JobExecution web application. Again, not exactly fitting your use case, but it may be a direction you wish to explore. There is a TON of examples of the JES here in the Community.
Moving on, I worked with @lucasdepaula and we dug up some code from @BrunoMueller. The result is a SAS program which exports SAS report objects and creates a PowerPoint file. I loaded the code onto GitHub so it would be available to everyone. I'm still working on usage notes, but it may be a good test to see what's clear (and not) in it's current state.
Please take a look and let me know if you need further guidance to get the code working. Lucas and I are available to walk you through it.
Thanks,
Joe
Join us for SAS Community Trivia
SAS Bowl XLIII, The New SAS Developer Portal
Wednesday, August 14, 2024, at 10 a.m. ET | #SASBowl
Hi @rmedlin,
Thanks for attending the webinar. Here is a link to the webinar recap, with links to the code on GitHub. Additionally, you may want to read a post by my colleague @Cindy_Wang: Programmatically export a Visual Analytics report to PDF.
Join us for SAS Community Trivia
SAS Bowl XLIII, The New SAS Developer Portal
Wednesday, August 14, 2024, at 10 a.m. ET | #SASBowl
Hi Joe,
I tried your excellent looking code as well a Cindy's but I usually get an error along these lines:
{"errorCode":0,"message":"The file could not be found.","details":["traceId: ebeb3a5e35e8d2c2","path: /files/files/bc6ae404-a5df-41a2-b245-01731616ccee/content"],"links":[],"version":2,"httpStatusCode":404}
I assume that means there is a configuration issue on the server side, but neither I nor our SAS admin can figure out what it is. Any insight you might have would be appreciated.
Rick
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.