<?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 excel, loop the worksheet in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-excel-loop-the-worksheet/m-p/364111#M704993</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know this error message. Can you post screen shots? You are loading xls(x) files, not zipped files?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 May 2014 11:42:59 GMT</pubDate>
    <dc:creator>Michiel_QV_Fan</dc:creator>
    <dc:date>2014-05-26T11:42:59Z</dc:date>
    <item>
      <title>Load excel, loop the worksheet</title>
      <link>https://community.qlik.com/t5/QlikView/Load-excel-loop-the-worksheet/m-p/364103#M704985</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;Anyone can extend help? I have one excel file, contains different sheets. Each sheet represent the department. How to load this in loop?&lt;/P&gt;&lt;P&gt;Please see attachment. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And will it also be possible to load multiple file using * asterisks? But at first I want to load all sheets contained.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks. Bill.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2012 07:20:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-excel-loop-the-worksheet/m-p/364103#M704985</guid>
      <dc:creator />
      <dc:date>2012-03-22T07:20:59Z</dc:date>
    </item>
    <item>
      <title>Load excel, loop the worksheet</title>
      <link>https://community.qlik.com/t5/QlikView/Load-excel-loop-the-worksheet/m-p/364104#M704986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We had some similar challenge and solved it with this script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for each file in FileList('D:\Qlikview\communitie\Copy of Record 2012.xlsx')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ODBC CONNECT32 TO [Excel Files;DBQ=$(file)];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tables: &lt;/P&gt;&lt;P&gt;SQLtables; &lt;/P&gt;&lt;P&gt;DISCONNECT; // Don't need ODBC connection anymore&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;One of the fields loaded by SQLtables is "TABLE_NAME". This field will contain the sheet name.&lt;/P&gt;&lt;P&gt;We will loop through this set of sheet names.&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;FOR i = 0 to NoOfRows('tables')-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Assign the TABLE_NAME to the variable "sheetName".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TABLE_NAMEs that contain spaces will be enclosed in single quotes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The purgeChar function will remove any quotes AND dollar signs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET sheetName = purgeChar(purgeChar(peek('TABLE_NAME', i, 'tables'), chr(39)), chr(36));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Optional filtering logic to select certain sheets&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Table_with_data:&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Now that we have a sheet name, a standard biff (Excel) load can be used.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD *, &lt;/P&gt;&lt;P&gt;&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;&amp;nbsp;&amp;nbsp; '$(sheetName)' as Sheet&amp;nbsp; // Optionally, the sheetName value may be loaded as a field&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM $(file) (ooxml, embedded labels, table is [$(sheetName)]);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;NEXT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2012 07:54:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-excel-loop-the-worksheet/m-p/364104#M704986</guid>
      <dc:creator>Michiel_QV_Fan</dc:creator>
      <dc:date>2012-03-22T07:54:12Z</dc:date>
    </item>
    <item>
      <title>Load excel, loop the worksheet</title>
      <link>https://community.qlik.com/t5/QlikView/Load-excel-loop-the-worksheet/m-p/364105#M704987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, would you mind to attach the qvw file? Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2012 08:08:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-excel-loop-the-worksheet/m-p/364105#M704987</guid>
      <dc:creator />
      <dc:date>2012-03-22T08:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Load excel, loop the worksheet</title>
      <link>https://community.qlik.com/t5/QlikView/Load-excel-loop-the-worksheet/m-p/364106#M704988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not at all. You have to edit the connection string to match your file location.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2012 08:24:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-excel-loop-the-worksheet/m-p/364106#M704988</guid>
      <dc:creator>Michiel_QV_Fan</dc:creator>
      <dc:date>2012-03-22T08:24:14Z</dc:date>
    </item>
    <item>
      <title>Load excel, loop the worksheet</title>
      <link>https://community.qlik.com/t5/QlikView/Load-excel-loop-the-worksheet/m-p/364107#M704989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I did it. But I still have one more problem. I have two records or more, Record 2012 and Record 2013 and soon... Will it be possible to loop the ODBC? Just like using * asterisks again?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You're doing greate huh, you did run it! Good script at all. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/laugh.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2012 08:38:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-excel-loop-the-worksheet/m-p/364107#M704989</guid>
      <dc:creator />
      <dc:date>2012-03-22T08:38:48Z</dc:date>
    </item>
    <item>
      <title>Load excel, loop the worksheet</title>
      <link>https://community.qlik.com/t5/QlikView/Load-excel-loop-the-worksheet/m-p/364108#M704990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried with * but that only extracts 1 file, and in a second test Qlikview crashed.&lt;/P&gt;&lt;P&gt;Quick work around is to repeat the load in a second load script and concatenate the files, or store them in separate QVD's. &lt;/P&gt;&lt;P&gt;If your history doesn't change then there will be no need to reload all files each time. Keep your history in separate QVD's and only load the active period. Then you will only have to change the source file in your script each year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add 'Filename() as Source' (for instance) to identify the source file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2012 09:05:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-excel-loop-the-worksheet/m-p/364108#M704990</guid>
      <dc:creator>Michiel_QV_Fan</dc:creator>
      <dc:date>2012-03-22T09:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Load excel, loop the worksheet</title>
      <link>https://community.qlik.com/t5/QlikView/Load-excel-loop-the-worksheet/m-p/364109#M704991</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What if multiple excel files has multiple sheets?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jan 2014 14:34:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-excel-loop-the-worksheet/m-p/364109#M704991</guid>
      <dc:creator />
      <dc:date>2014-01-23T14:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: Load excel, loop the worksheet</title>
      <link>https://community.qlik.com/t5/QlikView/Load-excel-loop-the-worksheet/m-p/364110#M704992</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Getting "Bad Zip File" error&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 10:26:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-excel-loop-the-worksheet/m-p/364110#M704992</guid>
      <dc:creator />
      <dc:date>2014-05-23T10:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Load excel, loop the worksheet</title>
      <link>https://community.qlik.com/t5/QlikView/Load-excel-loop-the-worksheet/m-p/364111#M704993</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know this error message. Can you post screen shots? You are loading xls(x) files, not zipped files?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 May 2014 11:42:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-excel-loop-the-worksheet/m-p/364111#M704993</guid>
      <dc:creator>Michiel_QV_Fan</dc:creator>
      <dc:date>2014-05-26T11:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Load excel, loop the worksheet</title>
      <link>https://community.qlik.com/t5/QlikView/Load-excel-loop-the-worksheet/m-p/364112#M704994</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;We will loop through this set of sheet names.&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;FOR i = 0 to NoOfRows('tables')-1&lt;/P&gt;&lt;P&gt;/////////&lt;/P&gt;&lt;P&gt;If we loop through this set of sheet names, why i cannot control number of sheets, which I want to load?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;If I have 13 sheets in xls file, that means&lt;/P&gt;&lt;P&gt;NoOfRows('tables')-1 = 13 &lt;/P&gt;&lt;P&gt;So if I want to load only 11 sheet I should change script to following:&lt;/P&gt;&lt;P&gt;FOR i = 0 to NoOfRows('tables')-3.&lt;/P&gt;&lt;P&gt;But this not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could somebody tell how work this loop? &lt;/P&gt;&lt;P&gt;And how we can control number of required to load sheets? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vitaliy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 17:33:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-excel-loop-the-worksheet/m-p/364112#M704994</guid>
      <dc:creator>vchuprina</dc:creator>
      <dc:date>2015-02-27T17:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: Load excel, loop the worksheet</title>
      <link>https://community.qlik.com/t5/QlikView/Load-excel-loop-the-worksheet/m-p/1639441#M704995</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;// Optional filtering logic to select certain sheets&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;How can I filter to select certain sheets?&lt;BR /&gt;I want to select only the sheets where the second number is a '1'.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 11:13:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-excel-loop-the-worksheet/m-p/1639441#M704995</guid>
      <dc:creator>alexandermllr</dc:creator>
      <dc:date>2019-10-24T11:13:53Z</dc:date>
    </item>
  </channel>
</rss>

