<?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 from excel having multiple sheets and each sheets having different number of column and different column names. in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Loading-from-excel-having-multiple-sheets-and-each-sheets-having/m-p/2036759#M85410</link>
    <description>&lt;P&gt;Thanks for the solution&lt;/P&gt;</description>
    <pubDate>Fri, 10 Feb 2023 23:38:11 GMT</pubDate>
    <dc:creator>M03</dc:creator>
    <dc:date>2023-02-10T23:38:11Z</dc:date>
    <item>
      <title>Loading from excel having multiple sheets and each sheets having different number of column and different column names.</title>
      <link>https://community.qlik.com/t5/App-Development/Loading-from-excel-having-multiple-sheets-and-each-sheets-having/m-p/2035746#M85357</link>
      <description>&lt;P&gt;Hi! All,&lt;/P&gt;
&lt;P&gt;I am trying to load from Excel which is having multiple sheets (around 350 sheets). Each sheet has different number of columns and few of the sheets column names are also different. I tried below code.&lt;/P&gt;
&lt;P&gt;But I am encountering 'Field not found error for few of the sheets'. Kindly help.&lt;/P&gt;
&lt;P&gt;Code is as below:&lt;/P&gt;
&lt;P&gt;First of all I created one new sheet in the same Excel workbook and listed down name of all the sheets.&lt;/P&gt;
&lt;P&gt;For.eg.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Sheet List&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;A&lt;/P&gt;
&lt;P&gt;B&lt;/P&gt;
&lt;P&gt;C&lt;/P&gt;
&lt;P&gt;D&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;
&lt;P&gt;n&lt;/P&gt;
&lt;P&gt;Thn i wrote below code in qlik&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;ExcelRead:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;"&lt;STRONG&gt;Sheet List"&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;From [lib://filepath/sheetname.xlsm]&lt;/P&gt;
&lt;P&gt;(ooxml,embedded labels, table is Sheet1);&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;Concat(chr(39)&amp;amp;"SheetList"&amp;amp;chr(39),',') as "ConcatList"&lt;/P&gt;
&lt;P&gt;Resident "&lt;STRONG&gt;ExcelRead&lt;/STRONG&gt;";&lt;/P&gt;
&lt;P&gt;Drop Table&amp;nbsp;"&lt;STRONG&gt;ExcelRead&lt;/STRONG&gt;";&lt;/P&gt;
&lt;P&gt;Let vExcelName = Peek('ConcatList');&lt;/P&gt;
&lt;P&gt;Drop Table Table;&lt;/P&gt;
&lt;P&gt;For Each SheetName in $(vExcelName)&lt;/P&gt;
&lt;P&gt;ExcelObjects:&lt;/P&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; A as Name,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; B as Country,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; C as State,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; D as&amp;nbsp;Street,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; '$(SheetName)' as [SheetList]&lt;/P&gt;
&lt;P&gt;From [lib://filepath/sheetname.xlsm]&lt;/P&gt;
&lt;P&gt;(ooxml, no labels, Header is 8 lines, table is Sheet1)&lt;/P&gt;
&lt;P&gt;where A&amp;lt;&amp;gt; Null();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kindly guide me with the code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 06:20:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loading-from-excel-having-multiple-sheets-and-each-sheets-having/m-p/2035746#M85357</guid>
      <dc:creator>M03</dc:creator>
      <dc:date>2023-02-09T06:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Loading from excel having multiple sheets and each sheets having different number of column and different column names.</title>
      <link>https://community.qlik.com/t5/App-Development/Loading-from-excel-having-multiple-sheets-and-each-sheets-having/m-p/2036526#M85403</link>
      <description>&lt;P&gt;Hello M03,&lt;/P&gt;
&lt;P&gt;Put&amp;nbsp; this script in a loop for each sheet, you will get your result.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;ColumnNames:
FIRST 1
LOAD RecNo() as RecNo, * FROM [$(YourExcelFilePath)] (ooxml, no labels, table is $(YourSheetName));

ColumnLabels:
CrossTable (Column, Label)
LOAD * Resident ColumnNames;

DROP Field RecNo, Column;
DROP Table ColumnNames;

ColumnOrder:
LOAD Concat(chr(34) &amp;amp; Label &amp;amp; chr(34), ',', AscOrder) as Fields;
LOAD Label, RecNo() as AscOrder Resident ColumnLabels;

DROP Table ColumnLabels;

LET vFields = Peek('Fields',0,'ColumnOrder');

Drop Table ColumnOrder;

YourOutputInMemoryTable:
LOAD $(vFields) FROM [$(YourExcelFilePath)] (ooxml, embedded labels, table is $(YourSheetName));&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 13:09:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loading-from-excel-having-multiple-sheets-and-each-sheets-having/m-p/2036526#M85403</guid>
      <dc:creator>SerhanKaraer</dc:creator>
      <dc:date>2023-02-10T13:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: Loading from excel having multiple sheets and each sheets having different number of column and different column names.</title>
      <link>https://community.qlik.com/t5/App-Development/Loading-from-excel-having-multiple-sheets-and-each-sheets-having/m-p/2036759#M85410</link>
      <description>&lt;P&gt;Thanks for the solution&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2023 23:38:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loading-from-excel-having-multiple-sheets-and-each-sheets-having/m-p/2036759#M85410</guid>
      <dc:creator>M03</dc:creator>
      <dc:date>2023-02-10T23:38:11Z</dc:date>
    </item>
  </channel>
</rss>

