cancel
Showing results for 
Search instead for 
Did you mean: 

Export a widget to CSV in Sisense.js

Nazeer
8 - Cloud Apps
8 - Cloud Apps

Team,

I am using Sisense.js to embed Sisense widgets to my applications, just want to understand the ways that how can  I give export to csv option .

Looking for an eportcsv button kind of solution.

Thanks,

Nazeer

1 ACCEPTED SOLUTION

Ophir_Buchman
Sisense Team Member
Sisense Team Member

Hi @Nazeer 

The best way to export CSV is using the dedicated "/csv" REST end-point
Try: https://SITE.sisense.com/api/datasources/SOURCE_NAME/jaql/csv

The payload should include the JAQL you are trying to extract

View solution in original post

5 REPLIES 5

Ophir_Buchman
Sisense Team Member
Sisense Team Member

Hi @Nazeer 

The best way to export CSV is using the dedicated "/csv" REST end-point
Try: https://SITE.sisense.com/api/datasources/SOURCE_NAME/jaql/csv

The payload should include the JAQL you are trying to extract

Nazeer
8 - Cloud Apps
8 - Cloud Apps

Hi Team,

Can we bring this functionality using Blox ?

Nazeer

Ophir_Buchman
Sisense Team Member
Sisense Team Member

Hi @Nazeer 

This can be done by following 3 steps:

  • Create a BloX widget with a custom-action button
  • Configure the button to run a JAQL query (see my article on how to do this - Link)
  • Generate a CSV file out of the data and send it to the browser for download (see reference)

Ophir

Nazeer
8 - Cloud Apps
8 - Cloud Apps

HI @Ophir_Buchman ,

This helped and worked fine in Sisense, but when I embed this widget to a web application using Sisense.js it is not working. our requirement is to use this in web application.

I am getting 401 status error, could you please help fix this.

Thanks

Nazeer

Ophir_Buchman
Sisense Team Member
Sisense Team Member

Hi @Nazeer 

Please refer to this: Link