Qlik Community

Integration, Extension & APIs

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

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
s29124141
Partner - Creator II
Partner - Creator II

Number format is not preserved while exporting the data.

Hi All, When the data is exported using below method, the formatting is not preserved in the exported data as shown below. Could anyone please help me out here?

Code to export the data of existing visualization.

var Export = function () {

  table.OnData.unbind(Export);

  table.exportData({ format: 'OOXML', download: false }, function (link) {

  window.open('http' + (config.isSecure ? 's' : '') + '://' + config.host + ':' + config.port + link, '_blank');

  });

};

app.visualization.get($(chart).attr('data-qlik-objid')).then(function (visual) {

  table = qlik.table(visual.model);

  Export();

});

Exported data shown without formatting in excel.

excel.PNG

Number format shown properly in the visualization.

chart.PNG

1 Solution

Accepted Solutions
Alexander_Thor
Employee
Employee

Hey,

In Qlik we have the Dual format that contains the text value and the numerical value of a data point.

In this case the textual value is what you see on the screen but the underlying numerical value is what gets exported.

A workaround is to wrap your expression in Text() or Money() to force Qlik to use the textual representation of the number for export.

See: Qlik Export Method | Qlik Community

View solution in original post

3 Replies
Alexander_Thor
Employee
Employee

Hey,

In Qlik we have the Dual format that contains the text value and the numerical value of a data point.

In this case the textual value is what you see on the screen but the underlying numerical value is what gets exported.

A workaround is to wrap your expression in Text() or Money() to force Qlik to use the textual representation of the number for export.

See: Qlik Export Method | Qlik Community

DouglasR
Contributor II
Contributor II

Hey, I'm trying to get the kpi formatted value, but I can only get the numerical value from the app.vizualition callback.

How can I use that Text() method on a mashup?

Thanks

DouglasR
Contributor II
Contributor II

Just for a little more info, what I want to do is get the kpi values as is on the graphics, so I can use those formatted values on mashup. I am not actually showing those graphics on my webpage