<?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: LOAD * FROM any of the five file locations (folders) where the .xlsx file exists in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-LOAD-FROM-any-of-the-five-file-locations-folders-where/m-p/1883940#M1216982</link>
    <description>&lt;P&gt;Thank you very much Marcus. It works like a charm!&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jan 2022 14:54:11 GMT</pubDate>
    <dc:creator>MrBosch</dc:creator>
    <dc:date>2022-01-21T14:54:11Z</dc:date>
    <item>
      <title>How to LOAD * FROM any of the five file locations (folders) where the .xlsx file exists in Qlik View?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-LOAD-FROM-any-of-the-five-file-locations-folders-where/m-p/1883769#M1216963</link>
      <description>&lt;P&gt;Hi Qlik-ers&lt;/P&gt;
&lt;P&gt;I have been reading a lot about this topic already but nowhere I found what I am actually looking for.&lt;/P&gt;
&lt;P&gt;Consider: I have a source file data.xlsx in one of the following folders:&lt;/P&gt;
&lt;P&gt;Folder1: C:\Users\XPS\Desktop&lt;BR /&gt;&lt;SPAN&gt;Folder2: C:\Users\XPS\Downloads&lt;BR /&gt;&lt;/SPAN&gt;Folder3: C:\Users\XPS\Qlikview Dashboards&lt;BR /&gt;Folder4: F:\Qlikview Sources&lt;/P&gt;
&lt;P&gt;I want the load script to check whether I have stored the data.xlsx file in any of these locations and then load it.&lt;/P&gt;
&lt;P&gt;I tried many things: a FOR EACH loop or IF THEN's to determine the existence of the file then creating the variable usefile and use that to perform the LOAD. Unfortunately to no succes.&lt;/P&gt;
&lt;P&gt;My last attempt for the load script:&lt;/P&gt;
&lt;P&gt;IF FileSize('C:\Users\XPS\Desktop') &amp;gt; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; THEN SET usefile='C:\Users\XPS\Desktop'; END IF&lt;BR /&gt;IF FileSize('&lt;SPAN&gt;C:\Users\XPS\Downloads&lt;/SPAN&gt;') &amp;gt; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; THEN SET usefile='&lt;SPAN&gt;C:\Users\XPS\Downloads&lt;/SPAN&gt;'; END IF&lt;BR /&gt;IF FileSize('C:\Users\XPS\Qlikview Dashboards') &amp;gt; 0 THEN SET usefile='C:\Users\XPS\Qlikview Dashboards'; END IF&lt;BR /&gt;IF FileSize('F:\Qlikview Sources') &amp;gt; 0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;THEN SET usefile='F:\Qlikview Sources'; END IF&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LOAD * 
FROM [$(usefile)]
(ooxml, embedded labels, table is Exports);&lt;/LI-CODE&gt;
&lt;P&gt;&lt;EM&gt;[I have not manually created a variable]&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Any help would be highly appreciated.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 14:21:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-LOAD-FROM-any-of-the-five-file-locations-folders-where/m-p/1883769#M1216963</guid>
      <dc:creator>MrBosch</dc:creator>
      <dc:date>2022-11-03T14:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to LOAD * FROM any of the five file locations (folders) where the .xlsx file exists in Qlik View?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-LOAD-FROM-any-of-the-five-file-locations-folders-where/m-p/1883873#M1216978</link>
      <description>&lt;P&gt;I would probably do something like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;for each file in 'path1\data.xlsx', 'path3\data.xlsx', 'path3\data.xlsx', 'path4\data.xlsx'
   if filesize('$(file)') then
      t: load * from [$(file)] (ooxml, …);
      exit for;
   end if
next&lt;/LI-CODE&gt;
&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 14:22:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-LOAD-FROM-any-of-the-five-file-locations-folders-where/m-p/1883873#M1216978</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2022-11-03T14:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: LOAD * FROM any of the five file locations (folders) where the .xlsx file exists</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-LOAD-FROM-any-of-the-five-file-locations-folders-where/m-p/1883884#M1216980</link>
      <description>&lt;P&gt;Thanks Marcus,&lt;/P&gt;
&lt;P&gt;I have changed the load script. Unfortunately it shows a fault somewhere and ignoring all other.&lt;/P&gt;
&lt;P&gt;I have tried the ; after the file list. The IF becomes blue but still no luck.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="script1" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/70709i82AD677D6522E659/image-size/medium?v=v2&amp;amp;px=400" role="button" title="load script.jpg" alt="load script.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;With an additional ; after the file list:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="script2" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/70710i68FEA01365CD02B2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="load script2.jpg" alt="load script2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 13:18:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-LOAD-FROM-any-of-the-five-file-locations-folders-where/m-p/1883884#M1216980</guid>
      <dc:creator>MrBosch</dc:creator>
      <dc:date>2022-01-21T13:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: LOAD * FROM any of the five file locations (folders) where the .xlsx file exists</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-LOAD-FROM-any-of-the-five-file-locations-folders-where/m-p/1883896#M1216981</link>
      <description>&lt;P&gt;For/If loops are not load-statements else conditions-statements which don't accept a line-break within the condition-parts else it must be written within a single-line, just like in my example. If the line length creates horizontal scrollbars or if you want to limit the length to a certain value you need to replace the statement-parts with shorter variables or you load them within a table and looping them through this table with a simple for loop instead of a for each loop.&lt;/P&gt;
&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 13:33:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-LOAD-FROM-any-of-the-five-file-locations-folders-where/m-p/1883896#M1216981</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2022-01-21T13:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: LOAD * FROM any of the five file locations (folders) where the .xlsx file exists</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-LOAD-FROM-any-of-the-five-file-locations-folders-where/m-p/1883940#M1216982</link>
      <description>&lt;P&gt;Thank you very much Marcus. It works like a charm!&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 14:54:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-LOAD-FROM-any-of-the-five-file-locations-folders-where/m-p/1883940#M1216982</guid>
      <dc:creator>MrBosch</dc:creator>
      <dc:date>2022-01-21T14:54:11Z</dc:date>
    </item>
  </channel>
</rss>

