Scripting the Save As Excel method of the Report Viewer Component

I see there is a right click menu option to “Save as XLS”, but I can’t find a way to access this functionality via a script the way the “Save as PDF” can be done using the “saveAsPDF” method. Is this not a built in function of the Report Viewer? Is there a way to glean what the right click menu option does in order to reproduce it?

Thanks,
Mike

Execute and distribute is what you want.

https://docs.inductiveautomation.com/display/DOC79/system.report.executeAndDistribute

1 Like

Or even, creatively, componentReference.saveAsXls(filename) - since that’s all that the popup menu is doing anyways.

1 Like

Thanks for the helpful input! :smiley: