<?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: Multiple excel files with different headers in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Multiple-excel-files-with-different-headers/m-p/1097676#M941263</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is very helpful.&amp;nbsp; Thanks again Gysbert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 17 Jan 2016 20:16:23 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-01-17T20:16:23Z</dc:date>
    <item>
      <title>Multiple excel files with different headers</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-excel-files-with-different-headers/m-p/1097672#M941257</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;I have a situation where I need to import multiple files into 1 table.&amp;nbsp; The files can have different column headers and some include columns others don't etc.&lt;/P&gt;&lt;P&gt;e.g. file 1 might include:&lt;/P&gt;&lt;P&gt;CaseID, Case Name, Case Date&lt;/P&gt;&lt;P&gt;File 2 might include:&lt;/P&gt;&lt;P&gt;CaseID, Case Title, CaseDate, Case Manager&lt;/P&gt;&lt;P&gt;File 3:&lt;/P&gt;&lt;P&gt;Case Number, Case Title, Case Manager&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;etc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the above example, I would want my output to have the following columns&lt;/P&gt;&lt;P&gt;CaseID,(which includes values from CaseID and Case Number)&lt;/P&gt;&lt;P&gt;CaseTitle,(which includes values from Case Nameand Case Title)&lt;/P&gt;&lt;P&gt;CaseDate&lt;/P&gt;&lt;P&gt;CaseManager&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've created a static list with the column headers I want in my output and was thinking of having a lookup table which maps all the potential column headers I might get in the files to my preferred list:&lt;/P&gt;&lt;P&gt;e.g&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CaseID = CaseID&lt;/P&gt;&lt;P&gt;Case Number = CaseID&lt;/P&gt;&lt;P&gt;CaseTitle = CaseTitle&lt;/P&gt;&lt;P&gt;Case Name = CaseTitle&lt;/P&gt;&lt;P&gt;Case Manager = CaseManager&lt;/P&gt;&lt;P&gt;CaseManager = CaseManager&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then I can do some kind of map on the column headers for each excel file to give me the columns I want when it comes to the consolidation of all files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this the best approach?&amp;nbsp; How can I extract all column headers and rename them before I add each file to the consolidated list?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for any advice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jan 2016 02:52:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-excel-files-with-different-headers/m-p/1097672#M941257</guid>
      <dc:creator />
      <dc:date>2016-01-16T02:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple excel files with different headers</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-excel-files-with-different-headers/m-p/1097673#M941258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps with something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RenameMap:&lt;/P&gt;&lt;P&gt;MAPPING LOAD * INLINE [&lt;/P&gt;&lt;P&gt;Old, New&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Case Number,CaseID&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Case Name,CaseTitle&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;CaseManager,CaseManager&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;]&lt;SPAN style="line-height: 1.5em;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;For Each vFile in F&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;ileList('*.xlsx')&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Temp:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD * FROM [$(vFile)] (ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RENAME FIELDS USING RenameMap&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STORE Temp INTO $(vFile).qvd (qvd);&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DROP TABLE Temp;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Next vFile&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;ResultTable:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD * FROM *.qvd (qvd);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jan 2016 09:59:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-excel-files-with-different-headers/m-p/1097673#M941258</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-01-16T09:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple excel files with different headers</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-excel-files-with-different-headers/m-p/1097674#M941259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is great, just what I was looking for.&amp;nbsp; The 2nd issue I have is that some of these column headers have carriage returns in them, e.g.&amp;nbsp; The column header is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Case Found?&lt;/P&gt;&lt;P&gt;1) Yes - Match&lt;/P&gt;&lt;P&gt;2) No&lt;/P&gt;&lt;P&gt;3) Possible Match"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Don't ask me why someone set up an excel with this as a column header!!)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once I've loaded the data into Temp, can I then loop through the headers and either remove the line feeds or crop the header to the line feed so I can then carry out the Rename Fields mapping?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jan 2016 18:46:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-excel-files-with-different-headers/m-p/1097674#M941259</guid>
      <dc:creator />
      <dc:date>2016-01-16T18:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple excel files with different headers</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-excel-files-with-different-headers/m-p/1097675#M941261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of an Inline table you can also use an excel file as source for the field mapping table. That way you can simply copy over all the field names, carriage returns and all, from all the excel files and add the new field names that should replace them to that excel file too.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Jan 2016 12:23:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-excel-files-with-different-headers/m-p/1097675#M941261</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-01-17T12:23:45Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple excel files with different headers</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-excel-files-with-different-headers/m-p/1097676#M941263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is very helpful.&amp;nbsp; Thanks again Gysbert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 17 Jan 2016 20:16:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-excel-files-with-different-headers/m-p/1097676#M941263</guid>
      <dc:creator />
      <dc:date>2016-01-17T20:16:23Z</dc:date>
    </item>
  </channel>
</rss>

