<?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 Re: Change Name of downloaded File in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Name-of-downloaded-File/m-p/2478390#M21159</link>
    <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/310340"&gt;@RajDubey&lt;/a&gt;&amp;nbsp;, if you are using SaaS I reccomend to use &lt;A href="https://qlik.dev/apis/rest/reports/" target="_self"&gt;Reports APIs&lt;/A&gt;. exportData method is no supported on SaaS.&lt;/P&gt;
&lt;P&gt;This is a simple example for creating a link tag and set a custom name to file.&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;//Download report
const report = await fetch(reportDownloadLocation, {
	credentials: "include",
	headers: {
		"Qlik-Web-Integration-Id": webIntegrationId
	}
});
const reportBlob = await report.blob()
const reportURL = URL.createObjectURL(reportBlob)
const link = document.createElement('a')
link.href = reportURL
//Rename exported files with a custom name before give it to client
link.setAttribute("download", `custom_report_name`);
document.body.appendChild(link)
link.click()
document.body.removeChild(link)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Aug 2024 09:32:52 GMT</pubDate>
    <dc:creator>alex_colombo</dc:creator>
    <dc:date>2024-08-28T09:32:52Z</dc:date>
    <item>
      <title>Change Name of downloaded File</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Name-of-downloaded-File/m-p/1979277#M17330</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I want to extract the data from an existing Visual from an existing Qlik App &amp;amp; store the result on Disk with a specific name.&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;connect to server&lt;/LI&gt;
&lt;LI&gt;connect to app (App API)&lt;/LI&gt;
&lt;LI&gt;fetch data from visual (Visualization API)&lt;/LI&gt;
&lt;LI&gt;export with a specific name&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I manage to do 1-3, but dont manage to change the filename of the downloaded file.&amp;nbsp; Any advice?&lt;/P&gt;
&lt;P&gt;//open app&lt;BR /&gt;var app = qlik.openApp('a5a8c513-d2e5-4ec9-be1e-1ebd995a493a', config);&lt;/P&gt;
&lt;P&gt;// Get visuals data &amp;amp; export&lt;BR /&gt;app.visualization.get('EaqBxc').then(function(vis){&lt;BR /&gt;vis.exportData({format:'CSV_T', state: 'A'}).then(function (link) {window.open(link);&lt;BR /&gt;window.close();&lt;BR /&gt;});&lt;BR /&gt;});&lt;/P&gt;
&lt;P&gt;} );&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 13:20:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Name-of-downloaded-File/m-p/1979277#M17330</guid>
      <dc:creator>pauljohansson</dc:creator>
      <dc:date>2022-09-09T13:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: Change Name of downloaded File</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Name-of-downloaded-File/m-p/1980414#M17345</link>
      <description>&lt;P&gt;I will answer this one myself &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; you can rename the file in Client Javascript, however, its not possible to change the path. The file will always end up in your profiles Download folder set in your browser, which makes perfect sense.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to specify filepath/name I assume Node.js is the way to go.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 07:40:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Name-of-downloaded-File/m-p/1980414#M17345</guid>
      <dc:creator>pauljohansson</dc:creator>
      <dc:date>2022-09-15T07:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Change Name of downloaded File</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Name-of-downloaded-File/m-p/2001240#M17513</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28256"&gt;@pauljohansson&lt;/a&gt;&amp;nbsp;, your goal is to change the file name that it comes automatically from Qlik server, such as&amp;nbsp;a50e4226-79e3-45cb-aed4-744dbd52c4b0.xlsx for an excel file?&lt;/P&gt;&lt;P&gt;If so, you can rename the exported file before giving it to the client. You can do it with few Javascript lines&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 13:50:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Name-of-downloaded-File/m-p/2001240#M17513</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2022-11-07T13:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: Change Name of downloaded File</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Name-of-downloaded-File/m-p/2001305#M17516</link>
      <description>&lt;P&gt;Hej&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/145804"&gt;@alex_colombo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;no , the goal is actually to change the &lt;STRONG&gt;download path,&lt;/STRONG&gt;&amp;nbsp;which is not possibly using client javascript - the file will always end up in the download folder.&amp;nbsp; I guess the solution would be to go for Node.js,&lt;/P&gt;
&lt;P&gt;br&lt;/P&gt;
&lt;P&gt;Paul&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 15:51:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Name-of-downloaded-File/m-p/2001305#M17516</guid>
      <dc:creator>pauljohansson</dc:creator>
      <dc:date>2022-11-07T15:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Change Name of downloaded File</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Name-of-downloaded-File/m-p/2001310#M17518</link>
      <description>&lt;P&gt;Why do you want to change the download folder? This is a client setting which comes from browser settings. Or you mean the download url such as &lt;EM&gt;https://_qlikServer_/&lt;/EM&gt;&lt;SPAN&gt;&lt;EM&gt;tempcontent/c4375340-0f60-4f8d-b42c-edb10f98db73/898f86e9-5700-4dee-a547-56ca04529cc2.xlsx?serverNodeId=f547ea7c-864a-44a3-87a2-00817848d756&lt;/EM&gt;?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Nov 2022 15:58:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Name-of-downloaded-File/m-p/2001310#M17518</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2022-11-07T15:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Change Name of downloaded File</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Name-of-downloaded-File/m-p/2477457#M21139</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/145804"&gt;@alex_colombo&lt;/a&gt;&amp;nbsp;We are trying to export excel and pdf with a Qlik SaaS application. We are not able to rename the table download. We have given a title to the table and we want to use the title for the downloadable excel and pdf. Do you have code ready which we can reuse?&lt;/P&gt;
&lt;P&gt;Default Export name for excel is : chart_excel.xlsx&lt;/P&gt;
&lt;P&gt;Default Export name for PDF is: download.pdf&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2024 08:41:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Name-of-downloaded-File/m-p/2477457#M21139</guid>
      <dc:creator>RajDubey</dc:creator>
      <dc:date>2024-08-22T08:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Change Name of downloaded File</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Name-of-downloaded-File/m-p/2477476#M21140</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/310340"&gt;@RajDubey&lt;/a&gt;&amp;nbsp;are you using &lt;A href="https://qlik.dev/apis/rest/reports/" target="_self"&gt;Reports REST APIs&lt;/A&gt;? In any case, there is no way so set the exported file name with APIs call. You have to rename the file in your code before return it to the client.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2024 09:51:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Name-of-downloaded-File/m-p/2477476#M21140</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2024-08-22T09:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: Change Name of downloaded File</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Name-of-downloaded-File/m-p/2478342#M21158</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/145804"&gt;@alex_colombo&lt;/a&gt; and&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28256"&gt;@pauljohansson&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;We had been working on renaming the files from&amp;nbsp;&lt;SPAN&gt;a50e4226-79e3-45cb-aed4-744dbd52c4b0.xlsx this format to Qlik_ChartName_Date.xlsx.&amp;nbsp; Could you please help in providing the JavaScript code for it?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Below is the code we are using to export the files to excel.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;$("className").click(function () {&lt;BR /&gt;app.getObject($("#" + $(this).attr("for")).data("qvid")).then(function (reply) {&lt;BR /&gt;var qTable = qlik.table(reply);&lt;BR /&gt;qTable.exportData({&lt;BR /&gt;download: true&lt;BR /&gt;});&lt;BR /&gt;});&lt;BR /&gt;})&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 07:31:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Name-of-downloaded-File/m-p/2478342#M21158</guid>
      <dc:creator>RajDubey</dc:creator>
      <dc:date>2024-08-28T07:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: Change Name of downloaded File</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Name-of-downloaded-File/m-p/2478390#M21159</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/310340"&gt;@RajDubey&lt;/a&gt;&amp;nbsp;, if you are using SaaS I reccomend to use &lt;A href="https://qlik.dev/apis/rest/reports/" target="_self"&gt;Reports APIs&lt;/A&gt;. exportData method is no supported on SaaS.&lt;/P&gt;
&lt;P&gt;This is a simple example for creating a link tag and set a custom name to file.&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;//Download report
const report = await fetch(reportDownloadLocation, {
	credentials: "include",
	headers: {
		"Qlik-Web-Integration-Id": webIntegrationId
	}
});
const reportBlob = await report.blob()
const reportURL = URL.createObjectURL(reportBlob)
const link = document.createElement('a')
link.href = reportURL
//Rename exported files with a custom name before give it to client
link.setAttribute("download", `custom_report_name`);
document.body.appendChild(link)
link.click()
document.body.removeChild(link)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 09:32:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Change-Name-of-downloaded-File/m-p/2478390#M21159</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2024-08-28T09:32:52Z</dc:date>
    </item>
  </channel>
</rss>

