<?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: if excel file exists then load in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/if-excel-file-exists-then-load/m-p/643050#M235617</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could actually just use "For each vFile in filelist()" like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;FOR&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;EACH&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vFile&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IN&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FILELIST&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('myFolder\file-*.xlsx')&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; *&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;From&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; [$(vFile)]&lt;BR /&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;txt&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;codepage&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; 1252, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;no&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;labels&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;delimiter&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; '\t', &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;msq&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;);&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;next&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vFile&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;This is the same as &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; *&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;From&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; [myFolder\file-*.xlsx]&lt;BR /&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;txt&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;codepage&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; 1252, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;no&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;labels&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;delimiter&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; '\t', &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;msq&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;but it doesn't crush even if there is zero files to load.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jan 2017 17:02:20 GMT</pubDate>
    <dc:creator>eniemenm</dc:creator>
    <dc:date>2017-01-09T17:02:20Z</dc:date>
    <item>
      <title>if excel file exists then load</title>
      <link>https://community.qlik.com/t5/QlikView/if-excel-file-exists-then-load/m-p/643044#M235611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some excel files&amp;nbsp; i have to load from a folder they may be many of them&amp;nbsp; differentiated by a date like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;file-20140522.xlsx, file-20140521.xlsx....etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i can load all of them using "file-*" in from statement of the load. I want to add a condition before the load&amp;nbsp; that would load only if at least one file exists , else it doesn't load . this is to skip the load error if no file exists.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 08:56:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-excel-file-exists-then-load/m-p/643044#M235611</guid>
      <dc:creator />
      <dc:date>2014-05-22T08:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: if excel file exists then load</title>
      <link>https://community.qlik.com/t5/QlikView/if-excel-file-exists-then-load/m-p/643045#M235612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using filesize() in a loop?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 08:58:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-excel-file-exists-then-load/m-p/643045#M235612</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-05-22T08:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: if excel file exists then load</title>
      <link>https://community.qlik.com/t5/QlikView/if-excel-file-exists-then-load/m-p/643046#M235613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Was going to suggest a different method, but &lt;A href="https://community.qlik.com/qlik-users/26418"&gt;tresesco&lt;/A&gt; gives a better solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 09:13:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-excel-file-exists-then-load/m-p/643046#M235613</guid>
      <dc:creator>ThornOfCrowns</dc:creator>
      <dc:date>2014-05-22T09:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: if excel file exists then load</title>
      <link>https://community.qlik.com/t5/QlikView/if-excel-file-exists-then-load/m-p/643047#M235614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hello james&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was going going to recommend your answer too &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;... can you put it back on this discussion please.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much for your help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 12:04:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-excel-file-exists-then-load/m-p/643047#M235614</guid>
      <dc:creator />
      <dc:date>2014-05-22T12:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: if excel file exists then load</title>
      <link>https://community.qlik.com/t5/QlikView/if-excel-file-exists-then-load/m-p/643048#M235615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;filetime() can be used as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that both functions return NULL if the specified file doesn't exist. FileSize can return 0 if the file exists and is empty. So you can use something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF NOT IsNull(FileTime('yourfilespec.xlsx')) THEN&lt;/P&gt;&lt;P&gt;// increase a counter or set a flag or just do a load with a wildcard&lt;/P&gt;&lt;P&gt;END IF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that you don't need a loop at all for your situation. If you use a wildcard spec (e.g. 'file-*.xlsx') then QlikView will return a non-NULL value if there is at least one file that matches your specification. I can't seem to figure out which file will be chosen. It looks like the first one will do...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 12:31:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-excel-file-exists-then-load/m-p/643048#M235615</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2014-05-22T12:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: if excel file exists then load</title>
      <link>https://community.qlik.com/t5/QlikView/if-excel-file-exists-then-load/m-p/643049#M235616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;To me works very well...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LET vListfileexists=0;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;for each vSpedFile in filelist ('file-*.xlsx')&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; LET vListfileexists=-1;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; EXIT FOR when vListfileexists;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;NEXT vSpedFile&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;IF vListfileexists THEN&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; LOAD ......&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ENDIF&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2016 18:29:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-excel-file-exists-then-load/m-p/643049#M235616</guid>
      <dc:creator>jptneumann</dc:creator>
      <dc:date>2016-11-18T18:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: if excel file exists then load</title>
      <link>https://community.qlik.com/t5/QlikView/if-excel-file-exists-then-load/m-p/643050#M235617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could actually just use "For each vFile in filelist()" like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;FOR&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;EACH&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vFile&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;IN&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FILELIST&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('myFolder\file-*.xlsx')&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; *&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;From&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; [$(vFile)]&lt;BR /&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;txt&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;codepage&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; 1252, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;no&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;labels&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;delimiter&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; '\t', &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;msq&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;);&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;next&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vFile&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;This is the same as &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; *&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;From&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; [myFolder\file-*.xlsx]&lt;BR /&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;txt&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;codepage&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; 1252, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;no&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;labels&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;delimiter&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; '\t', &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;msq&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;);&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;but it doesn't crush even if there is zero files to load.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2017 17:02:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/if-excel-file-exists-then-load/m-p/643050#M235617</guid>
      <dc:creator>eniemenm</dc:creator>
      <dc:date>2017-01-09T17:02:20Z</dc:date>
    </item>
  </channel>
</rss>

