<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Modify hypercube before export to Excel in Mashup in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Modify-hypercube-before-export-to-Excel-in-Mashup/m-p/1884978#M16202</link>
    <description>&lt;P&gt;I'm using the .exportData-method (&lt;A href="https://help.qlik.com/en-US/sense-developer/May2021/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/TableAPI/exportData-method.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense-developer/May2021/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/TableAPI/exportData-method.htm&lt;/A&gt;) to export the values in a table to Excel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I guess that the exportData-method uses the hypercube for the specified object when creating the Excel-file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My question is if there is any way I can modify the hypercube and the export-method then uses that modified hypercube when creating the Excel-file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried just changing the values in one of the cells in the qDataPages in the hypercube, but without any success&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;$scope.downloadFile = function($event){				    
    qix.app.getObject('YQPd').then(function(object){
	var qcx = object.layout.qHyperCube.qSize.qcx;
	var qcy = object.layout.qHyperCube.qSize.qcy;

	object.getHyperCubeData({
		"qPath": "/qHyperCubeDef",
		"qPages": [{
			"qLeft": 0,
			"qTop": 0,
			"qWidth": qcx,
			"qHeight": qcy
		}]
		}).then(function(data){
			data[0].qMatrix[0][0].qText = 'Test';
			object.layout.qHyperCube.qDataPages = data;

			qlik.table(object).exportData({download: true});
		});
	});
};&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The export works, but the exported values are not the modified values in the hypercube.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way this can be achieved?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Jesper&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jan 2022 11:55:24 GMT</pubDate>
    <dc:creator>_jespers_</dc:creator>
    <dc:date>2022-01-25T11:55:24Z</dc:date>
    <item>
      <title>Modify hypercube before export to Excel in Mashup</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Modify-hypercube-before-export-to-Excel-in-Mashup/m-p/1884978#M16202</link>
      <description>&lt;P&gt;I'm using the .exportData-method (&lt;A href="https://help.qlik.com/en-US/sense-developer/May2021/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/TableAPI/exportData-method.htm" target="_blank"&gt;https://help.qlik.com/en-US/sense-developer/May2021/Subsystems/APIs/Content/Sense_ClientAPIs/CapabilityAPIs/TableAPI/exportData-method.htm&lt;/A&gt;) to export the values in a table to Excel.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I guess that the exportData-method uses the hypercube for the specified object when creating the Excel-file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My question is if there is any way I can modify the hypercube and the export-method then uses that modified hypercube when creating the Excel-file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried just changing the values in one of the cells in the qDataPages in the hypercube, but without any success&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;$scope.downloadFile = function($event){				    
    qix.app.getObject('YQPd').then(function(object){
	var qcx = object.layout.qHyperCube.qSize.qcx;
	var qcy = object.layout.qHyperCube.qSize.qcy;

	object.getHyperCubeData({
		"qPath": "/qHyperCubeDef",
		"qPages": [{
			"qLeft": 0,
			"qTop": 0,
			"qWidth": qcx,
			"qHeight": qcy
		}]
		}).then(function(data){
			data[0].qMatrix[0][0].qText = 'Test';
			object.layout.qHyperCube.qDataPages = data;

			qlik.table(object).exportData({download: true});
		});
	});
};&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The export works, but the exported values are not the modified values in the hypercube.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way this can be achieved?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Jesper&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 11:55:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Modify-hypercube-before-export-to-Excel-in-Mashup/m-p/1884978#M16202</guid>
      <dc:creator>_jespers_</dc:creator>
      <dc:date>2022-01-25T11:55:24Z</dc:date>
    </item>
  </channel>
</rss>

