Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

erik_wetterberg
Valued Contributor III

Export extension to powerpoint

Hi,

I'm struggling to make my extension work when exporting a story to powerpoint.The extension works well in a sheet or a story, but when exporting the story to powerpoint I get the title (not actually rendered by the extension) but not the actual chart.

I have follwed the instructions here and set up the 'finished rendering notification:

return qlik.Promise.resolve();

but that did not solve the problem.

I'm pretty sure that this has worked with previous Qlik Sense versions, but now we are at Qlik Sense June September 2017, and it seems broken.

Has anybody got any suggestions? How can I troubleshoot this?

Erik

Message was edited by: Erik Wetterberg Corrected June -> September, since that is actually the version we are using.

https://extendingqlik.upper88.com/
1 Solution

Accepted Solutions
erik_wetterberg
Valued Contributor III

Re: Export extension to powerpoint

Just a quick followup on this, since the problem is now solved for our extensions, and others may run into the same problem. When I get a little more time I'll write this down in a bit more detail.

The problem was that the extension worked well in analyse mode and in a story, but when exporting to PowerPoint (haven't tested PDF) we just got an empty space.

The solution had three parts:

1) turn off animations. For highcharts, the charting library we are using, this turned out to be two flags you needed to turn off

2) make sure to return a Promise, and that the promise does not resolve until rendering is complete (I actually needed a delay of 0.5 second even after Highcharts reported rendering complete

3) andI'm afraid a least in Sepmtember 2017 you cannot use the Table API, because it does not work in export to PDF scenario.

Hope this helps

Erik Wetterberg

https://extendingqlik.upper88.com/
8 Replies
erik_wetterberg
Valued Contributor III

Re: Export extension to powerpoint

I have now managed to get this working for all extensions but one. Unlike the other extensions, the last one uses the Table API. Works well in analysis, and in story mode, but when we try to do a Powerpoint export, creating the table fails with error:

TypeError: b.getLayout is not a function

Erik

https://extendingqlik.upper88.com/
Employee
Employee

Re: Export extension to powerpoint

Hi erik.wetterberg‌,

Can you help us by sharing a snippet so we can fix the issue? Have you filed a bug?

thank you a lot for the explanation!

erik_wetterberg
Valued Contributor III

Re: Export extension to powerpoint

Hi,

Just verified that the bug is still there in September 2017 patch 1. Will try to make an example extension, shouldn't be that difficult.

Erik

https://extendingqlik.upper88.com/
erik_wetterberg
Valued Contributor III

Re: Export extension to powerpoint

Hi,

Here is a small extensions that reproduces the problem. Works in analysis and snapshot, but not in PowerPoint export.

Haven't found any way to debug this (is there one??), so I simply added a try/catch and add the error message to $element.

Erik

https://extendingqlik.upper88.com/
erik_wetterberg
Valued Contributor III

Re: Export extension to powerpoint

Just a quick followup on this, since the problem is now solved for our extensions, and others may run into the same problem. When I get a little more time I'll write this down in a bit more detail.

The problem was that the extension worked well in analyse mode and in a story, but when exporting to PowerPoint (haven't tested PDF) we just got an empty space.

The solution had three parts:

1) turn off animations. For highcharts, the charting library we are using, this turned out to be two flags you needed to turn off

2) make sure to return a Promise, and that the promise does not resolve until rendering is complete (I actually needed a delay of 0.5 second even after Highcharts reported rendering complete

3) andI'm afraid a least in Sepmtember 2017 you cannot use the Table API, because it does not work in export to PDF scenario.

Hope this helps

Erik Wetterberg

https://extendingqlik.upper88.com/
rav
New Contributor II

Re: Export extension to powerpoint

Hi Erik!

The extension that you provide miss the correct support property in the extension js file.

Try replacing :

snapshot: {

canTakeSnapshot: true

},

with:

support: {

snapshot: true,

export: true,

exportData: true

}

and it should work just fine.

erik_wetterberg
Valued Contributor III

Re: Export extension to powerpoint

Hi,

Sorry, I just made a quick extension using the table template, which has the old syntax. Still works, though. The real extension has the new syntax:

support: {

                snapshot: true,

                export: true,

                exportData: true

            },

           

I've tried modifying the extension example and rerun the test, in Qlik Sense Desktop September 2017 Patch 1, and still get the same result.

- works in analysis mode (yes it's very ugly)

- works in store

- break in story export to PDF:

Capture.PNG

Erik Wetterberg

https://extendingqlik.upper88.com/
erik_wetterberg
Valued Contributor III

Re: Export extension to powerpoint

BTW, you can also reproduce this by simply exporting the visualization to PowerPoint or PDF straight from the sheet.

Erik

https://extendingqlik.upper88.com/