Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have one query: to create extension, we need to write JavaScript. extensions are like to create custom charts.
What is the relationship between JavaScript and extensions.
Don't hesitate on my question.
And I have following queries.
I want export my charts to excel by using JavaScript.
I know we can write macros to export to excel.
But I want to use JavaScript to export.
Please help me out on this.
Thanks in advance.
Regards
Venkey.
If you want to export your visualization as table, you can do something like this:
* inject "qlik" in your extension: function (qlik, ...) {}
* create a variable for the current app: var app = qlik.currApp(this);
* by using the getObject method, you can create a Qlik Sense object: getObject method ‒ Qlik Sense Developers
Example:
var elem_id, // the id of the HTML element
chart_id, // the id of the chart
btn_id; // the id of the "download" button.
var object = app.getObject(elem_id, eval(chart_id));
object.then(function(model) {
var table = new qlik.table(model);
$('#btn_id').on('click', function(e) {
e.preventDefault();
table.exportData({download: true});
})
});
Hi Venkey
I found these links very interesting when I researched how to build extensions:
http://www.qliktips.com/2011/01/beginners-guide-to-qlikview-extension.html
http://qlikcommunity.s3.amazonaws.com/misc/index.html
Hope it helps