<?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 sheets from Excel XLSX dynamically without ODBC in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-multiple-sheets-from-Excel-XLSX-dynamically-without-ODBC/m-p/1693639#M593580</link>
    <description>&lt;P&gt;1. Summary Tab is generated automatically by macro. so each time you restart the QV script,&lt;BR /&gt;the macro generates the Summary tab. if you delete the tab and restart the script,&lt;BR /&gt;the Tab should be present again.&lt;BR /&gt;&lt;BR /&gt;2. I guess you need to hardcode it as long as you want to start the macro by script. If you start the macro&lt;BR /&gt;by Frontend Button you can use a QV Variable (including your path) and use this variable in your macro as a placeholder.&lt;/P&gt;&lt;P&gt;3. Im not sure what you are trying to achieve by adding a noconcatenate statement to the loop because your fieldnames are identically on all 3 tabs&lt;BR /&gt;which will force QV to autoconcatenate the tables. if you need to seperate the 3 tabs in QV Frontend just set a flag for filtering:&lt;/P&gt;&lt;P&gt;for each i in $(vFields)&lt;BR /&gt;Load *, '$(i)' as flag&lt;/P&gt;</description>
    <pubDate>Wed, 15 Apr 2020 11:51:02 GMT</pubDate>
    <dc:creator>Frank_Hartmann</dc:creator>
    <dc:date>2020-04-15T11:51:02Z</dc:date>
    <item>
      <title>Load multiple sheets from Excel XLSX dynamically without ODBC</title>
      <link>https://community.qlik.com/t5/QlikView/Load-multiple-sheets-from-Excel-XLSX-dynamically-without-ODBC/m-p/1692965#M593577</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I would like to load data from an Excel file which has multiple sheets. As an example, I have included a sample of the file. Essentially, there will be multiple such files where the first sheet will be a Summary sheet and will have the sheet name and description of the other sheets in the file.&lt;/P&gt;&lt;P&gt;This what I have so far.&lt;/P&gt;&lt;P&gt;SOURCE_FILE:&lt;BR /&gt;LOAD [Sheet Name] as Sheet_Name,&lt;BR /&gt;[Sheet Description]&lt;BR /&gt;FROM&lt;BR /&gt;[QV Lookups - Test.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is Summary);&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;BR /&gt;TEMP1:&lt;BR /&gt;LOAD&lt;BR /&gt;concat(Sheet_Name,',') as ConcatSheetNames&lt;BR /&gt;resident SOURCE_FILE;&lt;/P&gt;&lt;P&gt;LET vString = Peek('ConcatSheetNames',0,TEMP1);&lt;BR /&gt;LET vString1 = Chr(39) &amp;amp; $(vString) &amp;amp; Chr(39); &amp;lt;-- not working&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had seen a code which would allow me to capture the data in each sheet provided the sheet names are in single quotes.&lt;/P&gt;&lt;P&gt;LET vExcelFileName = 'QV Lookups - Test';&lt;BR /&gt;SET i = '2020-01-01','SILVER','20200331';&lt;/P&gt;&lt;P&gt;for each m in $(i);&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;Date,&lt;BR /&gt;Description,&lt;BR /&gt;Amount,&lt;BR /&gt;'$(m)' AS SheetName&lt;BR /&gt;FROM [$(vExcelFileName).xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is [$(m)]);&lt;/P&gt;&lt;P&gt;next&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I wanted to try and get the concatenated sheet names in the format ('Summary','2020-01-01','SILVER','20200331') however I am not able to do so and it is throwing error messages on that line of the concatenation.&lt;/P&gt;&lt;P&gt;Can anyone please help? Alternatively if there is a better way to do what I am trying to do without ODBC, I am more than happy to learn.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2020 11:04:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-multiple-sheets-from-Excel-XLSX-dynamically-without-ODBC/m-p/1692965#M593577</guid>
      <dc:creator>wildrain</dc:creator>
      <dc:date>2020-04-13T11:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Load multiple sheets from Excel XLSX dynamically without ODBC</title>
      <link>https://community.qlik.com/t5/QlikView/Load-multiple-sheets-from-Excel-XLSX-dynamically-without-ODBC/m-p/1693019#M593578</link>
      <description>&lt;P&gt;see attached files.&lt;/P&gt;&lt;P&gt;how it works:&lt;/P&gt;&lt;P&gt;the excel-summary tab is generated by a little macro inside module. so you can just delete it in your local excelfile. after&amp;nbsp; macro execution the neccessary information (which we generated by macro) can be used in further load script so that all the data on all sheets can be loaded within a simple loop without knowing the names of the exceltabs. Please adapt the path to your Excelfile inside module.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you have further questions feel free to ask.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;</description>
      <pubDate>Mon, 13 Apr 2020 14:59:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-multiple-sheets-from-Excel-XLSX-dynamically-without-ODBC/m-p/1693019#M593578</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2020-04-13T14:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Load multiple sheets from Excel XLSX dynamically without ODBC</title>
      <link>https://community.qlik.com/t5/QlikView/Load-multiple-sheets-from-Excel-XLSX-dynamically-without-ODBC/m-p/1693465#M593579</link>
      <description>&lt;P&gt;Hi Frank,&lt;/P&gt;&lt;P&gt;Thanks a lot for your response. I had a look through the files and it makes sense. Couple of follow up questions.&lt;BR /&gt;1. I would definitely require the Summary tab since it would contain notes of what the other tabs contain. That's how we have agreed to from a business standpoint. So that way, any user who opens the file can recognise the contents of the file without visiting the other tabs. I will read up about the modules though - never seen it before.&lt;BR /&gt;2. There would be multiple files involved so in the module, can the below line be modified to take it a parameter or does the file name need to be hard-coded in it?&lt;BR /&gt;set XLDOC = XLApp.Workbooks.Open ("C:\Users\Frank\Desktop\QV Lookups - Test.xlsx")&lt;BR /&gt;3. Before this line in the code "for each i in $(vFields)", I tried to add the lines&lt;BR /&gt;NoConcatenate&lt;BR /&gt;Data_File:&lt;BR /&gt;and Qlik threw an error. Just wondering why would it do that? I eventually had to resident load the data into the data file like below.&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;BR /&gt;Data_File:&lt;BR /&gt;LOAD&lt;BR /&gt;*&lt;BR /&gt;Resident Temptable;&lt;BR /&gt;drop table Temptable;&lt;/P&gt;&lt;P&gt;So I am trying to understand why one method is working while the other is failing.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2020 20:47:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-multiple-sheets-from-Excel-XLSX-dynamically-without-ODBC/m-p/1693465#M593579</guid>
      <dc:creator>wildrain</dc:creator>
      <dc:date>2020-04-14T20:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: Load multiple sheets from Excel XLSX dynamically without ODBC</title>
      <link>https://community.qlik.com/t5/QlikView/Load-multiple-sheets-from-Excel-XLSX-dynamically-without-ODBC/m-p/1693639#M593580</link>
      <description>&lt;P&gt;1. Summary Tab is generated automatically by macro. so each time you restart the QV script,&lt;BR /&gt;the macro generates the Summary tab. if you delete the tab and restart the script,&lt;BR /&gt;the Tab should be present again.&lt;BR /&gt;&lt;BR /&gt;2. I guess you need to hardcode it as long as you want to start the macro by script. If you start the macro&lt;BR /&gt;by Frontend Button you can use a QV Variable (including your path) and use this variable in your macro as a placeholder.&lt;/P&gt;&lt;P&gt;3. Im not sure what you are trying to achieve by adding a noconcatenate statement to the loop because your fieldnames are identically on all 3 tabs&lt;BR /&gt;which will force QV to autoconcatenate the tables. if you need to seperate the 3 tabs in QV Frontend just set a flag for filtering:&lt;/P&gt;&lt;P&gt;for each i in $(vFields)&lt;BR /&gt;Load *, '$(i)' as flag&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2020 11:51:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-multiple-sheets-from-Excel-XLSX-dynamically-without-ODBC/m-p/1693639#M593580</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2020-04-15T11:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: Load multiple sheets from Excel XLSX dynamically without ODBC</title>
      <link>https://community.qlik.com/t5/QlikView/Load-multiple-sheets-from-Excel-XLSX-dynamically-without-ODBC/m-p/1693665#M593581</link>
      <description>&lt;P&gt;1. Understood. So if the macro were to be removed, the Summary tab would stay permanently unless it was already deleted.&lt;/P&gt;&lt;P&gt;2. I will try this method. I have multiple files and the file names vary so I would like to pass this name as a parameter to the macro. That way irrespective of the file, the macro will run and create the Summary tab.&lt;/P&gt;&lt;P&gt;3. I was planning to add the statement before the loop but now I realise that it may have been redundant and that is why Qlik threw the error.&lt;/P&gt;&lt;P&gt;Thanks again for all your help.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2020 12:43:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-multiple-sheets-from-Excel-XLSX-dynamically-without-ODBC/m-p/1693665#M593581</guid>
      <dc:creator>wildrain</dc:creator>
      <dc:date>2020-04-15T12:43:44Z</dc:date>
    </item>
  </channel>
</rss>

