<?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 Multiple Excel Files into one table when each file may have different field names. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-Multiple-Excel-Files-into-one-table-when-each-file-may-have/m-p/1724889#M592080</link>
    <description>&lt;P&gt;// 1. Create a empty table with an existing fieldname&lt;BR /&gt;BaseData:&lt;BR /&gt;LOAD&lt;BR /&gt;Null() as A&lt;BR /&gt;AutoGenerate 0;&lt;/P&gt;&lt;P&gt;// 2. Concatenate all Files&lt;BR /&gt;Concatenate(BaseData)&lt;BR /&gt;LOAD *&lt;BR /&gt;FROM&lt;BR /&gt;[\\Path\*.xlsx]&lt;BR /&gt;(ooxml, embedded labels, header is 2 lines, table is [Data]);&lt;/P&gt;</description>
    <pubDate>Fri, 03 Jul 2020 15:47:23 GMT</pubDate>
    <dc:creator>cwolf</dc:creator>
    <dc:date>2020-07-03T15:47:23Z</dc:date>
    <item>
      <title>Load Multiple Excel Files into one table when each file may have different field names.</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Multiple-Excel-Files-into-one-table-when-each-file-may-have/m-p/1724556#M592078</link>
      <description>&lt;P&gt;Load Multiple Excel Files into one table when each file may have different field names.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to be able to load multiple files with a single load or script. The files have the same field names for the most part, but over time new fields are added to the end of the files.&lt;/P&gt;&lt;P&gt;I have multiple Excel files that typically have been loaded with a simple&lt;/P&gt;&lt;P&gt;BaseData:&lt;BR /&gt;LOAD *&lt;BR /&gt;FROM&lt;BR /&gt;[\\Path\*.xlsx]&lt;BR /&gt;(ooxml, embedded labels, header is 2 lines, table is [Data]);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above works as all the files have the same header names. Over time we’ve now added new data fields to the end of the Excel files, so we’ll have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;File 1 - Field A, B, C&lt;/P&gt;&lt;P&gt;File 2 - Field A, B, C, D&lt;/P&gt;&lt;P&gt;File 3 - Field A, B, C, D, E&lt;/P&gt;&lt;P&gt;As these files are only write files our solution has been to archive the data when new data fields were added. We’d create a QVD load where File 1 would be:&lt;/P&gt;&lt;P&gt;Load A,&lt;/P&gt;&lt;P&gt;B,&lt;/P&gt;&lt;P&gt;C,&lt;/P&gt;&lt;P&gt;‘ x’ as D,&lt;/P&gt;&lt;P&gt;‘y’ as E&lt;/P&gt;&lt;P&gt;…&lt;/P&gt;&lt;P&gt;File 2 would be similar, and then we’d continue to load the new File 3 type without out error or synthetic joins. Effectively creating one table of our data.&lt;/P&gt;&lt;P&gt;Now due to a business process change this folder of Excel files contains multiple file types over time. On one day we might get File 3 types for weeks then all of a sudden from an older tool we get File Type 1 or 2.&lt;/P&gt;&lt;P&gt;QlikView fails to load correctly in this situation and for now the only solution we have is to manually identify the file types and process them manually.&lt;/P&gt;&lt;P&gt;I’d love a solution where QV could identify the file type by the header values and then load and concatenate the tables correctly.&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2020 15:07:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Multiple-Excel-Files-into-one-table-when-each-file-may-have/m-p/1724556#M592078</guid>
      <dc:creator>smagboo2019</dc:creator>
      <dc:date>2020-07-02T15:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: Load Multiple Excel Files into one table when each file may have different field names.</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Multiple-Excel-Files-into-one-table-when-each-file-may-have/m-p/1724889#M592080</link>
      <description>&lt;P&gt;// 1. Create a empty table with an existing fieldname&lt;BR /&gt;BaseData:&lt;BR /&gt;LOAD&lt;BR /&gt;Null() as A&lt;BR /&gt;AutoGenerate 0;&lt;/P&gt;&lt;P&gt;// 2. Concatenate all Files&lt;BR /&gt;Concatenate(BaseData)&lt;BR /&gt;LOAD *&lt;BR /&gt;FROM&lt;BR /&gt;[\\Path\*.xlsx]&lt;BR /&gt;(ooxml, embedded labels, header is 2 lines, table is [Data]);&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2020 15:47:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Multiple-Excel-Files-into-one-table-when-each-file-may-have/m-p/1724889#M592080</guid>
      <dc:creator>cwolf</dc:creator>
      <dc:date>2020-07-03T15:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: Load Multiple Excel Files into one table when each file may have different field names.</title>
      <link>https://community.qlik.com/t5/QlikView/Load-Multiple-Excel-Files-into-one-table-when-each-file-may-have/m-p/1725383#M592082</link>
      <description>&lt;P&gt;Thanks, I had to load all fields as NULL to make this work, but your solution appears to have solved my problem. I had attempted something similar, but didn't add the auto generate or the NULL().&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;BaseData:&lt;BR /&gt;LOAD&lt;BR /&gt;Null() as A,&lt;BR /&gt;Null() as B,&lt;BR /&gt;Null() as C,&lt;BR /&gt;Null() as D,&lt;BR /&gt;Null() as E&lt;BR /&gt;AutoGenerate 0;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2020 13:49:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-Multiple-Excel-Files-into-one-table-when-each-file-may-have/m-p/1725383#M592082</guid>
      <dc:creator>smagboo2019</dc:creator>
      <dc:date>2020-07-06T13:49:08Z</dc:date>
    </item>
  </channel>
</rss>

