0 Replies Latest reply: Feb 7, 2017 5:26 PM by Mohamed Azmi RSS

    File Excel generate with different name

    Mohamed Azmi

      Hi every one I have question and I hope to find reply

       

      well I use button to generate excel file But issues is the name file is different who I mentionned in the code.

       

      _________________________________________________________________________________________________

      var app = qlik.openApp('Consumer_Sales.qvf', config);

      app.getObject('QV01','prgzES').then( function( vizModel ) {

       

           // Prevent clicking on the button too early

        $('#cmdExport').show();
        $('#cmdExport').on('click', function() {

       

           d = new Date();

        var dstring = d.valueOf(); // number of milliseconds since midnight January 1, 1970 UTC.

       

        var ordername = '123'

      //dstring //username+'_'+orderID+'_'+dstring;

       

        ///// Here I mentioned file name is test.xlsx but the file genarate with Test(0a674cab-2b0b-4b95-94ad-99802)

       

      var fileName =  'Test.xls'  3561a10)

       

        //vizModel.exportData('CSV_C','/qHyperCubeDef','Test','A').then(function( reply ) {

        vizModel.exportData('OOXML','/qHyperCubeDef',fileName,'A').then(function( reply ) {

      //console.log('qUrl', reply);
              alert("Success!");

         //window.open(reply.result.qUrl);  // Will download CSV to browser window as well as Export folder

           });
        })