Qlik Community

Ask a Question

Qlik Design Blog

All about product and Qlik solutions: scripting, data modeling, visual design, extensions, best practices, etc.

Announcements
QlikWorld Online 2021, May 10-12: Our Free, Virtual, Global Event REGISTER TODAY
Yianni_Ververis
Employee
Employee

In every new Qlik Sense release, we see some cool additions and features that make our life easier. All of the major ones, are discussed here, https://community.qlik.com/blogs/qlikproductinnovation/2018/09/11/qlik-sense-september-2018-has-arri...‌, but for those that work a lot with the Capability Api, there are 3 very much desired and long expected features: exportData, exportImg and exportPdf. With these, you can export any embedded object from your mashup in the above formats. You can also customize them by passing the desired options.

 

Below are the links to the help files so you can experiment more.

 

ExportData

https://help.qlik.com/en-US/sense-developer/September2018/Subsystems/APIs/Content/Sense_ClientAPIs/C...

 

ExportImg

https://help.qlik.com/en-US/sense-developer/September2018/Subsystems/APIs/Content/Sense_ClientAPIs/C...

 

ExportPdf

https://help.qlik.com/en-US/sense-developer/September2018/Subsystems/APIs/Content/Sense_ClientAPIs/C...

 

You can view all of these in action by visiting the qdt-components webpage

React template with qdt-components

 

Best,

Yianni

32 Comments
royal_87
Partner
Partner

I only got ExportData to work

Like this:

app.getObject('QV01', 'MYID').then( function( vizModel ) {

      vizModel.exportData(settings).then(function( reply ) { 

          console.log(reply);

      });

  });

But the other two methods doesn't work. What do I have to change in above code to get it work?

Allso your React template is broken.

0 Likes
6,158 Views
Yianni_Ververis
Employee
Employee

Here is the code with their settings on all of the 3 methods.

https://github.com/qlik-demo-team/qdt-components/blob/master/src/components/QdtButton.jsx

6,158 Views
royal_87
Partner
Partner

Thanks for you reply Yianni!

I checked at your code and it seemed to me that all three methods are being used the same way except for different options.

If I try to log them to the console I only find exportData. Is the other two methods on a different level?

   app.getObject('QV01', 'MYID').then( function( vizModel) {

       console.log(vizModel.exportData); // returns function

       console.log(vizModel.exportPdf);   // returns undifined

       console.log(vizModel.exportImg);   // returns undifined

  });

0 Likes
6,158 Views
bramkn
Partner
Partner

Is this also available in the .NET SDK? Have been waiting for this

0 Likes
6,158 Views
jfkinspari
Partner
Partner

Is it possible to export an entire sheet using these methods?

0 Likes
6,158 Views
Yianni_Ververis
Employee
Employee

Hello Jens

This methods are bind just to an object's model

0 Likes
6,158 Views