Qlik Community

Integration, Extension & APIs

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

Announcements
Don't miss the upcoming Q&A with Qlik session on Qlik Application Automation on November 16th! REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
hadooqlik
Contributor III
Contributor III

CSV export with Table API on mashup

Hi,

I can export to OOXML format, but when I change to CSV, rpc returns this error

Captura.PNG

with this code:

Captura.PNG

This frame is sent:

Captura.PNG

If I change "CSV_T" with "OOXML" then the table is exported correctly.

I don't find the reason, any suggestion?

Thanks,

JuanJo

1 Solution

Accepted Solutions
aaz
Employee
Employee

Hi Juan,

As swr‌, commented, you should use TableApi's exportData method ‒ Qlik Sense‌.

What you are using in your example is the exportData method from the visualization layout; I am not really sure if this is documented, or "officially exposed"... but the reason why you can export OOXML and not CSV_T or CSV_C file format is that you are missing the second parameter "qPath" see documentation here: ExportData method ‒ Qlik Sense‌ - this parameter is mandatory only for CSV_T and CSV_C.

regards,

aiham

View solution in original post

3 Replies
Stefan_Walther
Employee
Employee

Have a look here:

https://github.com/stefanwalther/sense-extension-recipes/tree/master/tableapi-exportdata-paint

Sent from my iPhone

aaz
Employee
Employee

Hi Juan,

As swr‌, commented, you should use TableApi's exportData method ‒ Qlik Sense‌.

What you are using in your example is the exportData method from the visualization layout; I am not really sure if this is documented, or "officially exposed"... but the reason why you can export OOXML and not CSV_T or CSV_C file format is that you are missing the second parameter "qPath" see documentation here: ExportData method ‒ Qlik Sense‌ - this parameter is mandatory only for CSV_T and CSV_C.

regards,

aiham

View solution in original post

Ranjit
Partner
Partner

Hi...,

 

Try this method.

 

var set = {
qFileType: 'CSV_C',
qPath: '/qHyperCubeDef',
qFileName: 'temp.csv'
}
app.getObject('sxqbWtE').then(function (m) {
console.log(m)
m.exportData(set).then(function (reply) {
console.log(reply)
window.open(reply.qUrl)
})
})