<?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: Loading Multiple sheets from multiple folders in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Re-Loading-Multiple-sheets-from-multiple-folders/m-p/2103493#M1224358</link>
    <description>&lt;P&gt;I have a script which load all files in the subfolders in a given main folder, also have a separate script where multiple sheets in different files in a folder can be loaded.&lt;/P&gt;
&lt;P&gt;Whereas the exact thing I'm looking for is how can we write a script that can load all the sheets from these different files which are in &lt;STRONG&gt;different folders&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example: Lets say there are 2021, 2022, 2023 folders, each of the folder has different files Jan21.xlsx, Feb21.xlsl etc., in 2021 folder,&amp;nbsp; Jan22.xlsx, Feb22.xlsx in 2022 folder and so on.&lt;/P&gt;
&lt;P&gt;These files (xlsx one's) has different sheets in them by country, i.e., India, USA, UK, Germary etc., as different sheets in each file.&lt;/P&gt;
&lt;P&gt;Now I need to load all the 3 years of files with all the countries coming up.&lt;/P&gt;</description>
    <pubDate>Tue, 08 Aug 2023 11:27:14 GMT</pubDate>
    <dc:creator>QlikView_99</dc:creator>
    <dc:date>2023-08-08T11:27:14Z</dc:date>
    <item>
      <title>Re: Loading Multiple sheets from multiple folders</title>
      <link>https://community.qlik.com/t5/QlikView/Re-Loading-Multiple-sheets-from-multiple-folders/m-p/2103493#M1224358</link>
      <description>&lt;P&gt;I have a script which load all files in the subfolders in a given main folder, also have a separate script where multiple sheets in different files in a folder can be loaded.&lt;/P&gt;
&lt;P&gt;Whereas the exact thing I'm looking for is how can we write a script that can load all the sheets from these different files which are in &lt;STRONG&gt;different folders&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example: Lets say there are 2021, 2022, 2023 folders, each of the folder has different files Jan21.xlsx, Feb21.xlsl etc., in 2021 folder,&amp;nbsp; Jan22.xlsx, Feb22.xlsx in 2022 folder and so on.&lt;/P&gt;
&lt;P&gt;These files (xlsx one's) has different sheets in them by country, i.e., India, USA, UK, Germary etc., as different sheets in each file.&lt;/P&gt;
&lt;P&gt;Now I need to load all the 3 years of files with all the countries coming up.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 11:27:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Re-Loading-Multiple-sheets-from-multiple-folders/m-p/2103493#M1224358</guid>
      <dc:creator>QlikView_99</dc:creator>
      <dc:date>2023-08-08T11:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Loading Multiple sheets from multiple folders</title>
      <link>https://community.qlik.com/t5/QlikView/Re-Loading-Multiple-sheets-from-multiple-folders/m-p/2103561#M1224360</link>
      <description>&lt;P&gt;It's just a further loop against a dirlist(). Within the help is a great example of it:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptControlStatements/For%20Each.htm" target="_blank"&gt;For each..next | Qlik Cloud Help&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 14:09:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Re-Loading-Multiple-sheets-from-multiple-folders/m-p/2103561#M1224360</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-08-08T14:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: Loading Multiple sheets from multiple folders</title>
      <link>https://community.qlik.com/t5/QlikView/Re-Loading-Multiple-sheets-from-multiple-folders/m-p/2103721#M1224364</link>
      <description>&lt;P&gt;&lt;SPAN&gt;You can accomplish loading multiple Excel files across different subfolders in Qlik Sense using a combination of loops and wildcard characters. Here's an example script that you can use:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cristianj23a_0-1691527723153.png" style="width: 813px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/113869i7B6E32877B9824EA/image-dimensions/813x361?v=v2" width="813" height="361" role="button" title="cristianj23a_0-1691527723153.png" alt="cristianj23a_0-1691527723153.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's an explanation of how this code works:&lt;/P&gt;
&lt;P&gt;- The outer loop goes through the years 2021, 2022, and 2023.&lt;BR /&gt;- The middle loop goes through the months Jan, Feb, Mar, etc.&lt;BR /&gt;- The inner loop uses FileList to iterate through each Excel file in the specified Year/Month folder.&lt;BR /&gt;- Inside the inner loop, separate LOAD statements are used for each country's sheet (India, USA, UK, Germany).&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;You can adjust the folder paths and sheet names as necessary to match your file structure.&lt;/P&gt;
&lt;P&gt;This will load all the specified sheets from all the Excel files across the folders into a single Qlik Sense table. Make sure that all the sheets have the same structure, or you may need to make adjustments to the LOAD statements to handle different formats.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 20:49:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Re-Loading-Multiple-sheets-from-multiple-folders/m-p/2103721#M1224364</guid>
      <dc:creator>cristianj23a</dc:creator>
      <dc:date>2023-08-08T20:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: Loading Multiple sheets from multiple folders</title>
      <link>https://community.qlik.com/t5/QlikView/Re-Loading-Multiple-sheets-from-multiple-folders/m-p/2103801#M1224365</link>
      <description>&lt;P&gt;Hi Marcus,&lt;/P&gt;
&lt;P&gt;Thank you for having a look at it and I've tried writing a script to accomplish what I'm trying to and attached are the one's that might help you to resolve the issue here.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 06:17:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Re-Loading-Multiple-sheets-from-multiple-folders/m-p/2103801#M1224365</guid>
      <dc:creator>QlikView_99</dc:creator>
      <dc:date>2023-08-09T06:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: Loading Multiple sheets from multiple folders</title>
      <link>https://community.qlik.com/t5/QlikView/Re-Loading-Multiple-sheets-from-multiple-folders/m-p/2103802#M1224366</link>
      <description>&lt;P&gt;Hi Cristian,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for taking time to explain the scenario, but unfortunately the resolution you mentioned doesn't fit my criteria. I don't want to force the years and months but read them from the folders. I've added the working file, where I've tried to make it work. Please have a look at it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 06:20:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Re-Loading-Multiple-sheets-from-multiple-folders/m-p/2103802#M1224366</guid>
      <dc:creator>QlikView_99</dc:creator>
      <dc:date>2023-08-09T06:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Loading Multiple sheets from multiple folders</title>
      <link>https://community.qlik.com/t5/QlikView/Re-Loading-Multiple-sheets-from-multiple-folders/m-p/2103835#M1224367</link>
      <description>&lt;P&gt;What's the issue? Your script worked. Instead of just listing the files you could also load from them.&lt;/P&gt;
&lt;P&gt;Just a few further hints. You should make your loading more explicitly by specifying to which table the load should be concatenated - means something like:&lt;/P&gt;
&lt;P&gt;concatenate(&lt;STRONG&gt;[myTable]&lt;/STRONG&gt;)&lt;/P&gt;
&lt;P&gt;because otherwise the last loaded table would be taken.&lt;/P&gt;
&lt;P&gt;Another point to keep attention for is that such for-loops and also external if-loop as well as sub-routines are control-structures which have a validity-workspace like it's common within many programming-tools. This means for example that a variable which is created within such area exists only there and is not globally available.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 07:02:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Re-Loading-Multiple-sheets-from-multiple-folders/m-p/2103835#M1224367</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-08-09T07:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Loading Multiple sheets from multiple folders</title>
      <link>https://community.qlik.com/t5/QlikView/Re-Loading-Multiple-sheets-from-multiple-folders/m-p/2103853#M1224368</link>
      <description>&lt;P&gt;Marcus, my script attached above is executing but not working as expected. It's loading only few files and not everything. Could you explain the concat thing you've said a bit futher.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QlikView_99_0-1691566374939.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/113906i0125EE37FE59512F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="QlikView_99_0-1691566374939.png" alt="QlikView_99_0-1691566374939.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QlikView_99_1-1691566389786.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/113907i6355F809F5476553/image-size/medium?v=v2&amp;amp;px=400" role="button" title="QlikView_99_1-1691566389786.png" alt="QlikView_99_1-1691566389786.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 07:37:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Re-Loading-Multiple-sheets-from-multiple-folders/m-p/2103853#M1224368</guid>
      <dc:creator>QlikView_99</dc:creator>
      <dc:date>2023-08-09T07:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: Loading Multiple sheets from multiple folders</title>
      <link>https://community.qlik.com/t5/QlikView/Re-Loading-Multiple-sheets-from-multiple-folders/m-p/2103907#M1224369</link>
      <description>&lt;P&gt;You are using the wrong iterator in the loop for fetching the sheets - it must j instead of i.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 08:57:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Re-Loading-Multiple-sheets-from-multiple-folders/m-p/2103907#M1224369</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-08-09T08:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: Loading Multiple sheets from multiple folders</title>
      <link>https://community.qlik.com/t5/QlikView/Re-Loading-Multiple-sheets-from-multiple-folders/m-p/2103950#M1224370</link>
      <description>&lt;P&gt;Thanks for your input. It's working.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 10:21:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Re-Loading-Multiple-sheets-from-multiple-folders/m-p/2103950#M1224370</guid>
      <dc:creator>QlikView_99</dc:creator>
      <dc:date>2023-08-09T10:21:30Z</dc:date>
    </item>
  </channel>
</rss>

