Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Keto
Partner - Contributor III
Partner - Contributor III

ExportData method problem

Hello,

I'm looking to get the contents of a crosstab from a qliksense app.
I succeeded using the engine API interface but I cannot reproduce the request in my JS script (I am not very mattress with this language).

I go through an enigma session, all the connection part works correctly, here is the part of the code in question:

 

const session = enigma.create(config); // Setting up the enigma session
session.open().then((global) => { // Attempt to open session
    console.log('Session was opened successfully');
    return global.openDoc("9d60b67f-cf93-4e6a-aa4c-6d0d3aeb656a").then((app) => {
        app.getObject("SpaUz").then((object) => { 
// I think the problem is bellow
            object.exportData({
                format: 'OOXML',
                state: 'A'
            }).then(function(link) {
                window.open(link);
            });
        })
    });
}).catch((error) => {
    console.log('Failed to open session and / or retrieve the app list:', error);
    process.exit(1);
});

 

 Thank you in advance for your help 🙂

I promise i try my best, motivation is the key !
1 Reply
Keto
Partner - Contributor III
Partner - Contributor III
Author

Hello, I have tried various modifications of the part of the code that does not work, and the most promising is the one that does not give me an error:

 

app.getObject("SpaUz").then((object) => {
    object.exportData('OOXML', '/qHyperCubeDef', 'namefiletest', 0);
})

 

But I have no console feedback, no one knows how to directly download the excel file or even just display the link ...?

I promise i try my best, motivation is the key !