<?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 Excel Files and check in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Loading-Excel-Files-and-check/m-p/132411#M19904</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Phil, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use a loop trough all the file and get them one by one. Then you can add FILENAME($(vFile)) to get the specific name for the file causing your extra columns. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;FOR EACH vFile IN FILELIST('path\*.xlsx')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;LOAD &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;FILENAME($(vFile)) AS Filename&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;FROM $(vFile);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;NEXT vFile&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Oct 2018 10:55:50 GMT</pubDate>
    <dc:creator>avkeep01</dc:creator>
    <dc:date>2018-10-24T10:55:50Z</dc:date>
    <item>
      <title>Loading Excel Files and check</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-Excel-Files-and-check/m-p/132409#M19902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm loading a number of excel files from a folder that should have the same number of columns and then output a final QVD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So Load the excel into TEMP, carry out some formatting, save it as a TEMP_filedate.qvd and drop TEMP .. and repeat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, sometimes there is the odd excel file with differing columns that causes a seperate TEMP-1 table to be created and throws the rest of the script out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to test that there are no Tables left in the qvw at the end of this load process and if there are create a small excel file with the name of the excel file that is causing the issue and then drop all tables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Phil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2018 08:10:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-Excel-Files-and-check/m-p/132409#M19902</guid>
      <dc:creator>prees959</dc:creator>
      <dc:date>2018-10-24T08:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Loading Excel Files and check</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-Excel-Files-and-check/m-p/132410#M19903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could try adapting this to suit your needs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//This script counts the number of tables loaded and outputs the names and the number of rows and columns in each.&lt;/P&gt;&lt;P&gt;//This tab should be at the end of the entire script. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR k = 0 TO NoOfTables()-1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vTableName = TableName($(k));&lt;/P&gt;&lt;P&gt;LET vNoOfRecords = NoOfRows('$(vTableName)');&lt;/P&gt;&lt;P&gt;LET vNoofColumns = NoOfFields('$(vTableName)');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tables:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'$(vTableName)' AS Table, &lt;/P&gt;&lt;P&gt;$(vNoOfRecords) AS [No Of Rows], &lt;/P&gt;&lt;P&gt;$(vNoofColumns) AS [No Of Columns]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AUTOGENERATE 1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NEXT k;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2018 08:22:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-Excel-Files-and-check/m-p/132410#M19903</guid>
      <dc:creator>atoz1158</dc:creator>
      <dc:date>2018-10-24T08:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Loading Excel Files and check</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-Excel-Files-and-check/m-p/132411#M19904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Phil, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use a loop trough all the file and get them one by one. Then you can add FILENAME($(vFile)) to get the specific name for the file causing your extra columns. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;FOR EACH vFile IN FILELIST('path\*.xlsx')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;LOAD &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;FILENAME($(vFile)) AS Filename&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;FROM $(vFile);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;NEXT vFile&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2018 10:55:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-Excel-Files-and-check/m-p/132411#M19904</guid>
      <dc:creator>avkeep01</dc:creator>
      <dc:date>2018-10-24T10:55:50Z</dc:date>
    </item>
  </channel>
</rss>

