<?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: Only load a table if it exists in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Only-load-a-table-if-it-exists/m-p/1662169#M729191</link>
    <description>&lt;P&gt;then just add&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set ErrorMode = 1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;after your Table3 load&amp;nbsp; and you will get noticed about any further errors.&lt;/P&gt;&lt;P&gt;this way you are supressing only the known errormessage on table3 (if this table doesnt exits)!&lt;/P&gt;</description>
    <pubDate>Thu, 02 Jan 2020 16:07:39 GMT</pubDate>
    <dc:creator>Frank_Hartmann</dc:creator>
    <dc:date>2020-01-02T16:07:39Z</dc:date>
    <item>
      <title>Only load a table if it exists</title>
      <link>https://community.qlik.com/t5/QlikView/Only-load-a-table-if-it-exists/m-p/1662128#M729188</link>
      <description>&lt;P&gt;I'm having trouble with some revenue data I'm trying to import.&lt;/P&gt;&lt;P&gt;It is stored monthly in an .xlsx file with 3 tabs, called 'Table 1', 'Table 2' and 'Table 3'. Table 1 contains the earnings, Table 2 contains the refunds and Table 3 contains corrections from previous months.&lt;/P&gt;&lt;P&gt;The problem I'm having is that the 'Table 3' tab does not exist if there are no historical corrections - so these Excel docs only contain the tabs 'Table 1' and 'Table 2'. How can I tell Qlikview that 'Table 3' is optional and to just move onto the next file if it doesn't exist? The code I'm currently using is:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;test:
LOAD 
     [Signup Date], 
     PURGECHAR(Bounty,'$') AS Bounty,
     [N/T], 
     Signup, 
     Track, 
     Referrer,
     IF(LEN(Referrer)&amp;lt;=1,'unkn',SUBFIELD(SUBFIELD(Referrer,'www.',2),'/',1)) AS website
FROM
_INPUT\earnings\*.xlsx
(ooxml, embedded labels, header is 1 lines, table is [Table 1])
WHERE Domain&amp;lt;&amp;gt;NULL();

CONCATENATE(test)
LOAD
     [Signup Date], 
     PURGECHAR(Bounty,'$') AS Bounty,
     [N/T], 
     Signup
FROM
_INPUT\earnings\*.xlsx
(ooxml, embedded labels, header is 1 lines, table is [Table 2])
WHERE Domain&amp;lt;&amp;gt;NULL();


CONCATENATE(test)
LOAD
     [Signup Date], 
     PURGECHAR(Bounty,'$') AS Bounty,
     [N/T], 
     Signup
FROM
_INPUT\earnings\*.xlsx
(ooxml, embedded labels, header is 1 lines, table is [Table 3])
WHERE Domain&amp;lt;&amp;gt;NULL();&lt;/LI-CODE&gt;&lt;P&gt;However it fails at the first file where there is not a Table 3.&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Only-load-a-table-if-it-exists/m-p/1662128#M729188</guid>
      <dc:creator>amy_otway</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Only load a table if it exists</title>
      <link>https://community.qlik.com/t5/QlikView/Only-load-a-table-if-it-exists/m-p/1662152#M729189</link>
      <description>&lt;P&gt;what happens if you add&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set ErrorMode=0;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;to the beginning of your script?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2020 15:38:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Only-load-a-table-if-it-exists/m-p/1662152#M729189</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2020-01-02T15:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Only load a table if it exists</title>
      <link>https://community.qlik.com/t5/QlikView/Only-load-a-table-if-it-exists/m-p/1662166#M729190</link>
      <description>&lt;P&gt;Hi Frank - thanks for the response.&lt;/P&gt;&lt;P&gt;Putting that at the top of the script does stop it failing at the Excel docs with a missing Table 3, but as the script is carrying out other inputs and calculations, I'm concerned that this will skip over any other errors that I do want flagged.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2020 16:02:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Only-load-a-table-if-it-exists/m-p/1662166#M729190</guid>
      <dc:creator>amy_otway</dc:creator>
      <dc:date>2020-01-02T16:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Only load a table if it exists</title>
      <link>https://community.qlik.com/t5/QlikView/Only-load-a-table-if-it-exists/m-p/1662169#M729191</link>
      <description>&lt;P&gt;then just add&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Set ErrorMode = 1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;after your Table3 load&amp;nbsp; and you will get noticed about any further errors.&lt;/P&gt;&lt;P&gt;this way you are supressing only the known errormessage on table3 (if this table doesnt exits)!&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2020 16:07:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Only-load-a-table-if-it-exists/m-p/1662169#M729191</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2020-01-02T16:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: Only load a table if it exists</title>
      <link>https://community.qlik.com/t5/QlikView/Only-load-a-table-if-it-exists/m-p/1662174#M729192</link>
      <description>&lt;P&gt;Aha, that does the job - thank you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2020 16:13:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Only-load-a-table-if-it-exists/m-p/1662174#M729192</guid>
      <dc:creator>amy_otway</dc:creator>
      <dc:date>2020-01-02T16:13:08Z</dc:date>
    </item>
  </channel>
</rss>

