<?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 tables with headers and No headers challenge in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-tables-with-headers-and-No-headers-challenge/m-p/1234836#M392961</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Nicole for your quick answer!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The point here is that I don't know if the first field is date or not, it's just an example. The only thing here is that I can get the headers of some of the tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Marcel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Jan 2017 11:56:46 GMT</pubDate>
    <dc:creator>marcel_olmo</dc:creator>
    <dc:date>2017-01-12T11:56:46Z</dc:date>
    <item>
      <title>Load tables with headers and No headers challenge</title>
      <link>https://community.qlik.com/t5/QlikView/Load-tables-with-headers-and-No-headers-challenge/m-p/1234833#M392958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have multiple excel sources, ones with headers, and other ones with no headers, but the same information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to know if there's a simple way to deduce the headers by some &lt;EM&gt;"mapping headers"&lt;/EM&gt; stuff in order to avoid a rename of multiple headers of multiple sources.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a simple example of what I'm talking about.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Imagine I have 1 table with headers like this :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date, &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Customer ID], &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Product ID], &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amount&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[TemplateExample.xlsx]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, embedded labels, table is Hoja1);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And another table with no headers but the same structure :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;LOAD A&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;as Date, &lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;as [Customer ID], &lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;as [Product ID], &lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;as Amount&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;STRONG&gt;FROM&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;[TemplateExample.xlsx]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(ooxml, explicit labels, table is Hoja2);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How could I do it avoiding the renaming stuff? The point is that I have multiple sources and 30 fields per source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached the example of what I'm doing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Marcel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2017 23:18:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-tables-with-headers-and-No-headers-challenge/m-p/1234833#M392958</guid>
      <dc:creator>marcel_olmo</dc:creator>
      <dc:date>2017-01-11T23:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: Load tables with headers and No headers challenge</title>
      <link>https://community.qlik.com/t5/QlikView/Load-tables-with-headers-and-No-headers-challenge/m-p/1234834#M392959</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This might be an over-kills, but I'd probably do something like the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Load the first line (labels) from one of the tabs that contain labels.&lt;/P&gt;&lt;P&gt;2. Process all the labels in a loop and generate the LOAD statement automatically, using the Labels that you just loaded&lt;/P&gt;&lt;P&gt;3. Process all the tabs using the Generated LOAD statement, with no labels and stripping off the accidental row of Labels using the "Conditional Delete" transformation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This way, with a little bit of scripting, you could process any number of tabs and fields, with or without labels.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you also have a huge number of tabs, you could get the list of all Tables by connecting to you spreadsheet using ODBC and then using the SQLTABLES command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;Oleg Troyansky&lt;/P&gt;&lt;P&gt;Upgrade your Qlik skills at the &lt;A href="http://masterssummit.com/"&gt;Masters Summit for Qlik&lt;/A&gt; - coming soon to Munich, Germany!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2017 02:03:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-tables-with-headers-and-No-headers-challenge/m-p/1234834#M392959</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2017-01-12T02:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Load tables with headers and No headers challenge</title>
      <link>https://community.qlik.com/t5/QlikView/Load-tables-with-headers-and-No-headers-challenge/m-p/1234835#M392960</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Code like the following should work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14841883932644892" jivemacro_uid="_14841883932644892" modifiedtitle="true"&gt;
&lt;P&gt;FileList:&lt;/P&gt;
&lt;P&gt;LOAD * INLINE [&lt;/P&gt;
&lt;P&gt;&amp;nbsp; FileName, Header, Table&lt;/P&gt;
&lt;P&gt;&amp;nbsp; TemplateExample.xlsx, 1, Hoja1&lt;/P&gt;
&lt;P&gt;&amp;nbsp; TemplateExample.xlsx, 0, Hoja2&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;FOR i=0 TO NoOfRows('FileList')-1&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LET vFile = PEEK('FileName', $(i), 'FileList');&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LET vHeader = PEEK('Header', $(i), 'FileList');&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LET vTable = PEEK('Table', $(i), 'FileList');&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Data:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; LOAD A AS Date,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; B AS [Customer ID],&lt;/P&gt;
&lt;P&gt;&amp;nbsp; C AS [Product ID],&lt;/P&gt;
&lt;P&gt;&amp;nbsp; D AS [Amount]&lt;/P&gt;
&lt;P&gt;&amp;nbsp; FROM $(vFile) (ooxml, no labels, header is $(vHeader) lines, table is $(vTable));&lt;/P&gt;
&lt;P&gt;NEXT&lt;/P&gt;


&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In FileList, if you have a list of all your files, a 1 if it has a header or a 0 if it doesn't, and the table/sheet to load from, you can write a loop to go through each file and load everything into your table with the same column names.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached your file with the working code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2017 02:33:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-tables-with-headers-and-No-headers-challenge/m-p/1234835#M392960</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2017-01-12T02:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: Load tables with headers and No headers challenge</title>
      <link>https://community.qlik.com/t5/QlikView/Load-tables-with-headers-and-No-headers-challenge/m-p/1234836#M392961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Nicole for your quick answer!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The point here is that I don't know if the first field is date or not, it's just an example. The only thing here is that I can get the headers of some of the tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Marcel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jan 2017 11:56:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-tables-with-headers-and-No-headers-challenge/m-p/1234836#M392961</guid>
      <dc:creator>marcel_olmo</dc:creator>
      <dc:date>2017-01-12T11:56:46Z</dc:date>
    </item>
  </channel>
</rss>

