<?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: How to read the data from multiple sheets of an excel file? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-read-the-data-from-multiple-sheets-of-an-excel-file/m-p/320914#M118233</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Have a look in to the attached file it will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Feb 2012 08:51:58 GMT</pubDate>
    <dc:creator>CELAMBARASAN</dc:creator>
    <dc:date>2012-02-27T08:51:58Z</dc:date>
    <item>
      <title>How to read the data from multiple sheets of an excel file?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-read-the-data-from-multiple-sheets-of-an-excel-file/m-p/320913#M118232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, greetings to all as this is my very first day at QlikCommunity.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a scenario, where I need to read the data from an excel workbook, which contains multiple work sheets. Each sheets contains the data in same format, but the name of sheet is not known to me. The script should be able to read the sheet name as well as data inside the sheet dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To elaborate more on this let me use an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A excel workbook contain the details of student grades in a excel workbook (student.xlsx). Lets say, this excel file contains the data of 10 students. Each sheet is saved as students name for example, sheet name 'bob' contains the grade transcript of student bob. Apart from this the student name is not mentioned anywhere in the sheet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently, I am using a for loop with the names of students as hardcoded, but now I need to read it dynamically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know, how can I acheive this. I hope I am making sense. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like an interesting problem, hope to get a solution soon. Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;UT&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 08:41:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-read-the-data-from-multiple-sheets-of-an-excel-file/m-p/320913#M118232</guid>
      <dc:creator />
      <dc:date>2012-02-27T08:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the data from multiple sheets of an excel file?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-read-the-data-from-multiple-sheets-of-an-excel-file/m-p/320914#M118233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Have a look in to the attached file it will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 08:51:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-read-the-data-from-multiple-sheets-of-an-excel-file/m-p/320914#M118233</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-02-27T08:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the data from multiple sheets of an excel file?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-read-the-data-from-multiple-sheets-of-an-excel-file/m-p/320915#M118234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Celambarasan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help. I really appreciated the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This solution looks close but in this script you look for all worksheet starting with Sales*. But, I have no clues about the nature of names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think we can use the same logic with some custamization.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 09:49:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-read-the-data-from-multiple-sheets-of-an-excel-file/m-p/320915#M118234</guid>
      <dc:creator />
      <dc:date>2012-02-27T09:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the data from multiple sheets of an excel file?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-read-the-data-from-multiple-sheets-of-an-excel-file/m-p/320916#M118235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; In your case don't use If Statement apply directly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Remove this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;IF wildmatch('$(sheetName)', 'Sales*') THEN&amp;nbsp; // Only sheetNames that begin "Sales"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; END IF&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;// End of optional sheet filtering&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Use the following alone&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Sales:&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'$(sheetName)' as Student &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;FROM workbook.xls (biff, embedded labels, table is [$(sheetName)]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Celambarasan&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 10:16:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-read-the-data-from-multiple-sheets-of-an-excel-file/m-p/320916#M118235</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-02-27T10:16:58Z</dc:date>
    </item>
    <item>
      <title>How to read the data from multiple sheets of an excel file?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-read-the-data-from-multiple-sheets-of-an-excel-file/m-p/320917#M118236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;I will try it and let you know. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 10:23:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-read-the-data-from-multiple-sheets-of-an-excel-file/m-p/320917#M118236</guid>
      <dc:creator />
      <dc:date>2012-02-27T10:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the data from multiple sheets of an excel file?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-read-the-data-from-multiple-sheets-of-an-excel-file/m-p/320918#M118237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Note: If you are using a 64-bit system then you should use &lt;/P&gt;&lt;P&gt;Provider=Microsoft.ACE.OLEDB.12.0;&lt;/P&gt;&lt;P&gt;instead of &lt;/P&gt;&lt;P&gt;Provider=Microsoft.Jet.OLEDB.4.0;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following is a modified 64-bit example for loading workbook.xls which is put in C:\qv_data folder:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Connect using the Jet provider. Specify the workbook path in the "Data Source" spec below. */&lt;/P&gt;&lt;P&gt;CONNECT TO [Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\qv_data\workbook.xls;Extended Properties="Excel 8.0;"];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*&lt;/P&gt;&lt;P&gt;The SQLtables statement will load the "tables" table with a set of fields&lt;/P&gt;&lt;P&gt;describing the tables in the ODBC datasource. For Excel, each sheet is a table.&lt;/P&gt;&lt;P&gt;*/&lt;/P&gt;&lt;P&gt;tables:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Name the table that will be created by SQLTables stmt&lt;/P&gt;&lt;P&gt;SQLtables;&lt;/P&gt;&lt;P&gt;DISCONNECT;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // 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; /*&lt;/P&gt;&lt;P&gt;&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; TABLE_NAMEs that contain spaces will be enclosed in single quotes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The purgeChar function will remove any quotes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET sheetName = purgeChar(peek('TABLE_NAME', i, 'tables'), chr(39));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Optional filtering logic to select certain sheets&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF wildmatch('$(sheetName)', 'Sales*') THEN&amp;nbsp; // Only sheetNames that begin "Sales"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales:&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; // 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; 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; '$(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; FROM C:\qv_data\workbook.xls (biff, embedded labels, table is [$(sheetName)]);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; END IF&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // End of optional sheet filtering&lt;/P&gt;&lt;P&gt;NEXT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE tables;&amp;nbsp;&amp;nbsp; // The table list is no longer needed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jul 2013 09:34:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-read-the-data-from-multiple-sheets-of-an-excel-file/m-p/320918#M118237</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-10T09:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the data from multiple sheets of an excel file?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-read-the-data-from-multiple-sheets-of-an-excel-file/m-p/320919#M118238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Quan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The script is working fine when I reload the report manually&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I reload using qlikview publisher, I am getting below error:&lt;/P&gt;&lt;P&gt;CONNECT*Provider*&lt;/P&gt;&lt;P&gt;Error: ErrorSource: Microsoft OLE DB Service Components, ErrorMsg: Class not registered&lt;/P&gt;&lt;P&gt;General Script Error&lt;/P&gt;&lt;P&gt;Execution Failed&lt;/P&gt;&lt;P&gt;Execution finished.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What can be the reason?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Aug 2014 06:18:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-read-the-data-from-multiple-sheets-of-an-excel-file/m-p/320919#M118238</guid>
      <dc:creator />
      <dc:date>2014-08-18T06:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to read the data from multiple sheets of an excel file?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-read-the-data-from-multiple-sheets-of-an-excel-file/m-p/320920#M118239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Same issue here. My QV version is 11.20&lt;/P&gt;&lt;P&gt;Any hints?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 19:52:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-read-the-data-from-multiple-sheets-of-an-excel-file/m-p/320920#M118239</guid>
      <dc:creator />
      <dc:date>2014-10-30T19:52:30Z</dc:date>
    </item>
  </channel>
</rss>

