Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Aiham_Azmeh
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

Aiham_Azmeh
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

Ranjit
Partner - Contributor
Partner - Contributor

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)
})
})