Skip to main content
thulasik7152
April 5, 2023
Question

How to export stored procedure data subset to excel?

  • April 5, 2023
  • 3 replies
  • 0 views

Hi Team,

Here I want to pass parameters dynamically from Appian to the stored procedure and get the data subset, then export that data subset to Excel. I have created a stored procedure, and when I tested passing dynamic fields and data, I am getting results. Now I wanted to export this data subset to Excel, so I tried using the "Export SQL to Excel" smart service. But I am getting the following error: "The following error was raised by the Export to Excel function: null"

Is there any other smart service to export data subsets to Excel? Please advise. Thank you!

3 replies

adityag9712
April 5, 2023

Hi, 

Here you can try building the your sql query in a script task and pass that query in Export SQL to Excel.

abhayd3663
April 5, 2023

It will be easier to generate a database view from the the result set returned by the stored proc and then use the db view to export data into excel.  

mikes0011
Brainy
April 5, 2023

Should be as simple as using the Export CDT to Excel node, after querying your stored procedure output into a CDT.  It doesn't even have to be a really special CDT or anything, you can just create a dummy CDT with a dozen or so plaintext columns (allowing you to reuse it for several things).