Export Perspective report to Excel

Hi PGriffith,

How we can have Report Viewer Table(Only) data exported to XLS or downloaded in form of XLS in perspective likewise we do in Vision.

You can’t, via the report viewer component. Instead, use system.report.executeReport to generate the report in Excel format, then system.perspective.download to initiate a download with the user.

I doubt if Parameter can take a Datasource values in my case its a StaticCSV Values

.

You absolutely can pass a dataset as a parameter, you just need to pass it as a dictionary; eg:
bytesArray = system.report.executeReport(path="My_Report_Folder/Shift_Report", project="Reports", parameters = {"data": DT_Data}, filetype="xls)

And that would pass directly to system.perspective.download:
system.perspective.download("Shift Report", bytesArray)

Now i am getting this error of DT_Data is not defined Global:-

You used DT_Data in your earlier example that you took a screenshot of. I don’t know where you defined that variable, if at all. You won’t have access to it if it’s some dataset from a Perspective session, but you can always pass a manually constructed dataset for testing. Or, you can do your script testing within the Perspective console.

Thanks PGriffith for the reply.

I have manually Created the Data inside Report in Data Source as “Static CSV DT-Data” .I want to convert same Report Static CSV DT-Data Datasource into Excel while fetching it from Perspective View.

If it’s a static CSV data key, then you don’t need to provide anything in the parameters dictionary - it’s only for providing (as the name implies) parameters to your report. Just make it an empty dictionary: {}.