<?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 QlikView Automation Series – Unzip &amp; Load Excel Files: in Scalability</title>
    <link>https://community.qlik.com/t5/Scalability/QlikView-Automation-Series-Unzip-Load-Excel-Files/m-p/1483436#M1164</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;We often receive zipped folders with Excel files in them and since QlikView has this awesome capability of implementing VBScript/Macros, why not take advantage of this feature.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"&gt;The below scripts and attached documents will take you through the steps of automating unzipping and loading Excel files. &lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;Firstly, we need to bring the Edit Module by either pressing Ctrl and M or clicking Tools -&amp;gt; Edit Module:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Calibri, sans-serif; font-size: 11pt; line-height: 1.5em;"&gt;&lt;IMG alt="capture.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/105918_capture.png" style="height: auto;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;In the Edit Module, we need to type the below VBScript that unzips the zipped folder. Function takes two parameters, Folder and Destination. Folder is the location of the zipped file and Destination is the location where we want to unzip the folder to. One important point is that we are using a function here so that we can return the destination path. The script Unzip = Destination returns the destination folder path. I also had to change the Requested Module Security to System Access and Current Local Security to Allow System Access in order to make the script work:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;IMG alt="Capture2.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/105919_Capture2.PNG" style="height: 489px; width: 620px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;After this, we also need to handle reading and loading files from the unzipped folder. In the below script, we are calling the Unzip() function and assigning to a variable so that we can use the destination name to read all the files. In the Unzip() function, we are providing two variables, one for the location of the zipped folder and the another one is for the path for unzipped folder. The other two variables; vTempName and vTable are to extract file names and to use them as table names:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="capture.png" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/105927_capture.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;To make this more user friendly, we create a dashboard and provide two input boxes so that users can enter the locations of both the zipped and unzipped folders:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;IMG alt="Capture3.PNG" class="image-4 jive-image" src="https://community.qlik.com/legacyfs/online/105928_Capture3.PNG" style="height: auto;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;Lastly, we assign the reload action to the Unzip &amp;amp; Reload button.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"&gt;I am attaching the zipped Example file which has two excel files, Locations and Sales as well as the qvw.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"&gt;Hope this helps everyone.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Nov 2015 16:00:07 GMT</pubDate>
    <dc:creator>sinanozdemir</dc:creator>
    <dc:date>2015-11-18T16:00:07Z</dc:date>
    <item>
      <title>QlikView Automation Series – Unzip &amp; Load Excel Files:</title>
      <link>https://community.qlik.com/t5/Scalability/QlikView-Automation-Series-Unzip-Load-Excel-Files/m-p/1483436#M1164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;We often receive zipped folders with Excel files in them and since QlikView has this awesome capability of implementing VBScript/Macros, why not take advantage of this feature.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"&gt;The below scripts and attached documents will take you through the steps of automating unzipping and loading Excel files. &lt;/SPAN&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;Firstly, we need to bring the Edit Module by either pressing Ctrl and M or clicking Tools -&amp;gt; Edit Module:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Calibri, sans-serif; font-size: 11pt; line-height: 1.5em;"&gt;&lt;IMG alt="capture.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/105918_capture.png" style="height: auto;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;In the Edit Module, we need to type the below VBScript that unzips the zipped folder. Function takes two parameters, Folder and Destination. Folder is the location of the zipped file and Destination is the location where we want to unzip the folder to. One important point is that we are using a function here so that we can return the destination path. The script Unzip = Destination returns the destination folder path. I also had to change the Requested Module Security to System Access and Current Local Security to Allow System Access in order to make the script work:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;IMG alt="Capture2.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/105919_Capture2.PNG" style="height: 489px; width: 620px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 1.5em; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;After this, we also need to handle reading and loading files from the unzipped folder. In the below script, we are calling the Unzip() function and assigning to a variable so that we can use the destination name to read all the files. In the Unzip() function, we are providing two variables, one for the location of the zipped folder and the another one is for the path for unzipped folder. The other two variables; vTempName and vTable are to extract file names and to use them as table names:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="capture.png" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/105927_capture.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;To make this more user friendly, we create a dashboard and provide two input boxes so that users can enter the locations of both the zipped and unzipped folders:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;&lt;IMG alt="Capture3.PNG" class="image-4 jive-image" src="https://community.qlik.com/legacyfs/online/105928_Capture3.PNG" style="height: auto;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;Lastly, we assign the reload action to the Unzip &amp;amp; Reload button.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"&gt;I am attaching the zipped Example file which has two excel files, Locations and Sales as well as the qvw.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"&gt;Hope this helps everyone.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2015 16:00:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Scalability/QlikView-Automation-Series-Unzip-Load-Excel-Files/m-p/1483436#M1164</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-11-18T16:00:07Z</dc:date>
    </item>
  </channel>
</rss>

