<?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: Get the tab name from an Excel spreadsheet in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Get-the-tab-name-from-an-Excel-spreadsheet/m-p/1020463#M928041</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-14663"&gt;Dynamically Loading Multiple Excel Files&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Mar 2016 15:41:53 GMT</pubDate>
    <dc:creator>Kushal_Chawda</dc:creator>
    <dc:date>2016-03-18T15:41:53Z</dc:date>
    <item>
      <title>Get the tab name from an Excel spreadsheet</title>
      <link>https://community.qlik.com/t5/QlikView/Get-the-tab-name-from-an-Excel-spreadsheet/m-p/1020462#M928040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Hello QV Community - I have a spreadsheet with multiple tabs, and each tab name contains important information such as the region code for the source of the data.&amp;nbsp; What I want to do is include the tab name as a column in the QV data.&amp;nbsp; Is there a way to do that?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-the-tab-name-from-an-Excel-spreadsheet/m-p/1020462#M928040</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Get the tab name from an Excel spreadsheet</title>
      <link>https://community.qlik.com/t5/QlikView/Get-the-tab-name-from-an-Excel-spreadsheet/m-p/1020463#M928041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-14663"&gt;Dynamically Loading Multiple Excel Files&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2016 15:41:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-the-tab-name-from-an-Excel-spreadsheet/m-p/1020463#M928041</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2016-03-18T15:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Get the tab name from an Excel spreadsheet</title>
      <link>https://community.qlik.com/t5/QlikView/Get-the-tab-name-from-an-Excel-spreadsheet/m-p/1020464#M928042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kush141087 - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the speedy reply.&amp;nbsp; Where is this taking the tab name and making it a column?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Mar 2016 15:48:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-the-tab-name-from-an-Excel-spreadsheet/m-p/1020464#M928042</guid>
      <dc:creator />
      <dc:date>2016-03-18T15:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: Get the tab name from an Excel spreadsheet</title>
      <link>https://community.qlik.com/t5/QlikView/Get-the-tab-name-from-an-Excel-spreadsheet/m-p/1020465#M928043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Helllo Ron,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can do this with a macro:&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_14583458927451398" jivemacro_uid="_14583458927451398"&gt;
&lt;P&gt;function GetWorksheets(pExcelFile)&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; set ExApp = CreateObject("Excel.Application")&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; ExApp.Visible = False&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; set ExWrk = ExApp.Workbooks.Open(pExcelFile)&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; s = ""&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; for i = 1 to ExWrk.Sheets.Count&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if i = ExWrk.Sheets.Count then&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s = s + "'" + ExWrk.Sheets(i).Name + "'"&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s = s + "'" + ExWrk.Sheets(i).Name + "',"&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end if&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; next&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; ExWrk.Close&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; ExApp.Quit&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; GetWorksheets=s&amp;nbsp; &lt;/P&gt;
&lt;P&gt;end function&amp;nbsp; &lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the script:&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_14583459854808958" jivemacro_uid="_14583459854808958"&gt;
&lt;P&gt;set vExcelFile='C:\Temp\Test.xlsx';&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;let vSheets=GetWorksheets('$(vExcelFile)');&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;for Each vSheet in $(vSheets)&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; LOAD&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; '$(vSheet)' as Region,&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; *&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; FROM [$(vExcelFile)] (ooxml, embedded labels, table is [$(vSheet)]);&amp;nbsp; &lt;/P&gt;
&lt;P&gt;next&amp;nbsp; &lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Mar 2016 00:07:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-the-tab-name-from-an-Excel-spreadsheet/m-p/1020465#M928043</guid>
      <dc:creator>cwolf</dc:creator>
      <dc:date>2016-03-19T00:07:53Z</dc:date>
    </item>
    <item>
      <title>Re: Get the tab name from an Excel spreadsheet</title>
      <link>https://community.qlik.com/t5/QlikView/Get-the-tab-name-from-an-Excel-spreadsheet/m-p/1020466#M928044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 13px; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;'$(vSheetName)'&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #993300;"&gt;Sheet_name&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Mar 2016 05:10:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-the-tab-name-from-an-Excel-spreadsheet/m-p/1020466#M928044</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2016-03-19T05:10:55Z</dc:date>
    </item>
  </channel>
</rss>

