<?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>idea Re: Get Excel Sheet Names in Excel Loading Data Connector - Status changed to: Closed - Archived in Suggest an Idea</title>
    <link>https://community.qlik.com/t5/Suggest-an-Idea/Get-Excel-Sheet-Names-in-Excel-Loading-Data-Connector/idc-p/2100422#M13682</link>
    <description />
    <pubDate>Wed, 02 Aug 2023 15:33:18 GMT</pubDate>
    <dc:creator>Ideation</dc:creator>
    <dc:date>2023-08-02T15:33:18Z</dc:date>
    <item>
      <title>Get Excel Sheet Names in Excel Loading Data Connector</title>
      <link>https://community.qlik.com/t5/Suggest-an-Idea/Get-Excel-Sheet-Names-in-Excel-Loading-Data-Connector/idi-p/1905751</link>
      <description>&lt;P&gt;Hello all,&lt;BR /&gt;&lt;BR /&gt;Here an idea for all Excel+Qlik lovers : I would like to retrieve easily the list of Sheet Names for an Excel File.&lt;BR /&gt;&lt;BR /&gt;Use case : I got dozens and dozens of excel files. Some of them contains a Version sheet, some not. I want to know the version where there is a version sheet and to identify the excel files where it's missing.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I know there is this turnardound&amp;nbsp;&lt;A href="https://community.qlik.com/t5/QlikView-Documents/Loading-Multiple-Excel-Sheets-Dynamically-along-with-file-name/ta-p/1481095" target="_blank" rel="noopener"&gt;https://community.qlik.com/t5/QlikView-Documents/Loading-Multiple-Excel-Sheets-Dynamically-along-with-file-name/ta-p/1481095&lt;/A&gt;&amp;nbsp; but it's really not trivial at all for a user and only work on QlikView.&lt;BR /&gt;&lt;BR /&gt;Alteryx proposes it and it really helped.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="simonaubert_0-1647410842653.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/74584iB3467191D618E120/image-size/medium?v=v2&amp;amp;px=400" role="button" title="simonaubert_0-1647410842653.jpeg" alt="simonaubert_0-1647410842653.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;&lt;BR /&gt;Simon&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jul 2022 14:04:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Suggest-an-Idea/Get-Excel-Sheet-Names-in-Excel-Loading-Data-Connector/idi-p/1905751</guid>
      <dc:creator>simonaubert</dc:creator>
      <dc:date>2022-07-09T14:04:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get Excel Sheet Names in Excel Loading Data Connector</title>
      <link>https://community.qlik.com/t5/Suggest-an-Idea/Get-Excel-Sheet-Names-in-Excel-Loading-Data-Connector/idc-p/1905937#M8983</link>
      <description>&lt;P&gt;It would indeed be handy to be able to dynamically read all sheets in an Excel file without resorting to the clunky QV workaround.&lt;/P&gt;
&lt;P&gt;Insofar as checking whether a sheet exists, I think you could actually do that in QS with a workaround, though it's thoroughly clunky. This version requires there be content in the first column A but could likely be adapted to anything as long as the sheet contains some sort of data in a specific column.&lt;/P&gt;
&lt;P&gt;// Here we would create a loop to read through all the files and a variable to contain the current file name, used a single file for testing&lt;BR /&gt;Set vFileName = 'lib://AttachedFiles/Book1.xlsx';&lt;BR /&gt;Set ErrorMode = 0;&lt;BR /&gt;Excel:&lt;BR /&gt;Load '' as B // Just to make sure we have an Excel table, though I don't think this is actually necessary, force of habit&lt;BR /&gt;Autogenerate(1);&lt;BR /&gt;CONCATENATE&lt;BR /&gt;LOAD&lt;BR /&gt;A, '$(vFileName)' as FileName &lt;BR /&gt;FROM ['$(vFileName)']&lt;BR /&gt;(ooxml, no labels, table is Schrodinger);&lt;/P&gt;
&lt;P&gt;Let vExists = FieldNumber('A','Excel');&lt;/P&gt;
&lt;P&gt;Set ErrorMode = 1;&lt;/P&gt;
&lt;P&gt;IF vExists &amp;gt;0 THEN &lt;BR /&gt;Load '$(vFileName)' as File &lt;BR /&gt;, 'Has Schrodinger''s Sheet' as HasSheet&lt;BR /&gt;Resident Excel;&lt;BR /&gt;ELSE &lt;BR /&gt;Load '$(vFileName)' as File&lt;BR /&gt;, 'Has no Schrodinger''s Sheet' as HasSheet&lt;BR /&gt;Resident Excel;&lt;/P&gt;
&lt;P&gt;END IF&lt;/P&gt;
&lt;P&gt;Drop Table Excel;&lt;/P&gt;
&lt;P&gt;// Here we would loop to the next file&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 11:18:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Suggest-an-Idea/Get-Excel-Sheet-Names-in-Excel-Loading-Data-Connector/idc-p/1905937#M8983</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-03-16T11:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: Get Excel Sheet Names in Excel Loading Data Connector</title>
      <link>https://community.qlik.com/t5/Suggest-an-Idea/Get-Excel-Sheet-Names-in-Excel-Loading-Data-Connector/idc-p/1905955#M8985</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6142"&gt;@Or&lt;/a&gt;&amp;nbsp; . Thanks for the answer. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;I actually implemented something very similar for my use case but that only works because I know the sheet name. And it's dirty, I would prefer to not use the errormode.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;SUB Version_Fichier_Excel(p_Table_Entree,p_Champ_Contenant_Le_Chemin)
NoConcatenate
TMP_Fichiers_Excel:
LOAD 
  $(p_Champ_Contenant_Le_Chemin) as Fichier_Excel
RESIDENT [$(p_Table_Entree)]
where right(Fichier_Complet_Liste,5)='.xlsx';

let v_Nb_Fichier_Excel=NoOfRows('TMP_Fichiers_Excel');

NoConcatenate
Version_Fichier_Excel:
LOAD 
  text(Null()) as [Fichier_Excel],
  text(null()) as [Version Fichier Excel]
Autogenerate(0);

FOR i_excel_file=0 to $(v_Nb_Fichier_Excel)-1

    let v_fichier_excel=peek('Fichier_Excel',$(i_excel_file),'TMP_Fichiers_Excel');
	set errormode=0;

    NoConcatenate
    TMP_Version_Fichier_Excel:
    LOAD
        MaxString(F1) as [Version Fichier Excel]
    FROM [$(v_fichier_excel)]
    (ooxml, embedded labels, table is Version)
    where F1&amp;lt;&amp;gt;'Version';

    Concatenate(Version_Fichier_Excel)
    LOAD *,
    text('$(v_fichier_excel)') as [Fichier_Excel]
    RESIDENT TMP_Version_Fichier_Excel;

    DROP TABLE TMP_Version_Fichier_Excel;
	set errormode=1;
    
Next i_excel_file;

DROP TABLE TMP_Fichiers_Excel;
END SUB;
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;&lt;BR /&gt;Simon&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 11:44:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Suggest-an-Idea/Get-Excel-Sheet-Names-in-Excel-Loading-Data-Connector/idc-p/1905955#M8985</guid>
      <dc:creator>simonaubert</dc:creator>
      <dc:date>2022-03-16T11:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: Get Excel Sheet Names in Excel Loading Data Connector</title>
      <link>https://community.qlik.com/t5/Suggest-an-Idea/Get-Excel-Sheet-Names-in-Excel-Loading-Data-Connector/idc-p/1905960#M8986</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/54230"&gt;@simonaubert&lt;/a&gt; Yup, it's clunky and limited, but it should work for that specific use case. I already added my like to this idea, so perhaps Qlik will add this at some point in the future and let us easily read the contents of all sheets in a file or all sheets within a directory. &lt;/P&gt;
&lt;P&gt;One other potential approach, which is also clunky but in a different way, is to set up a &lt;A href="https://www.howtoexcel.org/get-all-sheet-names-from-all-workbooks-in-a-folder/" target="_self"&gt;PowerQuery task&lt;/A&gt; to generate all of the sheet names and then use that in Qlik. I'm not an expert on this but I assume it could be set up to automatically update the sheet names on a scheduled basis.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 11:55:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Suggest-an-Idea/Get-Excel-Sheet-Names-in-Excel-Loading-Data-Connector/idc-p/1905960#M8986</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-03-16T11:55:10Z</dc:date>
    </item>
    <item>
      <title>From now on, please track this idea from the Ideation por...</title>
      <link>https://community.qlik.com/t5/Suggest-an-Idea/Get-Excel-Sheet-Names-in-Excel-Loading-Data-Connector/idc-p/2100421#M13681</link>
      <description>&lt;P&gt;From now on, please track this idea from the Ideation portal.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A title="Link to new idea" href="https://ideation.qlik.com/app/#/case/281284" target="_blank" rel="noopener"&gt;Link to new idea&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Meghann&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;EM&gt;NOTE: Upon clicking this link 2 tabs may open - please feel free to close the one with a login page. If you &lt;STRONG&gt;only&lt;/STRONG&gt; see 1 tab with the login page, please try clicking this link first: &lt;STRONG&gt;&lt;A title="Authenticate me!" href="#" target="_blank" rel="noopener"&gt;Authenticate me!&lt;/A&gt;&lt;/STRONG&gt;&amp;nbsp;t&lt;/EM&gt;&lt;EM&gt;hen try the link above again. Ensure pop-up blocker is off.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2023 15:33:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Suggest-an-Idea/Get-Excel-Sheet-Names-in-Excel-Loading-Data-Connector/idc-p/2100421#M13681</guid>
      <dc:creator>Meghann_MacDonald</dc:creator>
      <dc:date>2023-08-02T15:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Get Excel Sheet Names in Excel Loading Data Connector - Status changed to: Closed - Archived</title>
      <link>https://community.qlik.com/t5/Suggest-an-Idea/Get-Excel-Sheet-Names-in-Excel-Loading-Data-Connector/idc-p/2100422#M13682</link>
      <description />
      <pubDate>Wed, 02 Aug 2023 15:33:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Suggest-an-Idea/Get-Excel-Sheet-Names-in-Excel-Loading-Data-Connector/idc-p/2100422#M13682</guid>
      <dc:creator>Ideation</dc:creator>
      <dc:date>2023-08-02T15:33:18Z</dc:date>
    </item>
  </channel>
</rss>

