Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 🙂
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 ...?