<?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 Loading Excel Files With Prefixes Into Qlik in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Loading-Excel-Files-With-Prefixes-Into-Qlik/m-p/2504560#M103794</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have several excel files which needs to be loaded. Each of the files starts with one of the following prefixes: AMS, BFS, MIL. ie: AMS_New23, BFS_01/01/25 etc. Sometimes one of the files will not be there and i need to load whatever from this files exists into shared folder.&lt;/P&gt;
&lt;P&gt;I tried:&lt;/P&gt;
&lt;P&gt;SET vPrefixes = 'AMS, BFS, MIL';&lt;BR /&gt;&lt;BR /&gt;PrefixesTable:&lt;BR /&gt;LOAD SubField('$(vPrefixes)', ',') as Prefix&lt;BR /&gt;AUTOGENERATE 1&lt;BR /&gt;WHILE IterNo() &amp;lt;= SubStringCount('$(vPrefixes)', ',') + 1;&lt;BR /&gt;&lt;BR /&gt;for each prefix in FieldValueList('Prefix')&lt;BR /&gt;for each file in FileList('lib://Geo_EMEA/A1 Lazar Test/' &amp;amp; '$(prefix)*.xlsx')&lt;BR /&gt;LOAD *&lt;BR /&gt;FROM [$(file)] (ooxml, embedded labels, table is Sheet1);&lt;BR /&gt;next file&lt;BR /&gt;next prefix&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But apparently FieldValueList does not work, since i am able to load only file with first defined Prefix.&lt;/P&gt;
&lt;P&gt;Do you have any idea on how to do this ?&lt;/P&gt;
&lt;P&gt;Thank you !&lt;/P&gt;</description>
    <pubDate>Wed, 05 Feb 2025 09:33:24 GMT</pubDate>
    <dc:creator>LK13</dc:creator>
    <dc:date>2025-02-05T09:33:24Z</dc:date>
    <item>
      <title>Loading Excel Files With Prefixes Into Qlik</title>
      <link>https://community.qlik.com/t5/App-Development/Loading-Excel-Files-With-Prefixes-Into-Qlik/m-p/2504560#M103794</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I have several excel files which needs to be loaded. Each of the files starts with one of the following prefixes: AMS, BFS, MIL. ie: AMS_New23, BFS_01/01/25 etc. Sometimes one of the files will not be there and i need to load whatever from this files exists into shared folder.&lt;/P&gt;
&lt;P&gt;I tried:&lt;/P&gt;
&lt;P&gt;SET vPrefixes = 'AMS, BFS, MIL';&lt;BR /&gt;&lt;BR /&gt;PrefixesTable:&lt;BR /&gt;LOAD SubField('$(vPrefixes)', ',') as Prefix&lt;BR /&gt;AUTOGENERATE 1&lt;BR /&gt;WHILE IterNo() &amp;lt;= SubStringCount('$(vPrefixes)', ',') + 1;&lt;BR /&gt;&lt;BR /&gt;for each prefix in FieldValueList('Prefix')&lt;BR /&gt;for each file in FileList('lib://Geo_EMEA/A1 Lazar Test/' &amp;amp; '$(prefix)*.xlsx')&lt;BR /&gt;LOAD *&lt;BR /&gt;FROM [$(file)] (ooxml, embedded labels, table is Sheet1);&lt;BR /&gt;next file&lt;BR /&gt;next prefix&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But apparently FieldValueList does not work, since i am able to load only file with first defined Prefix.&lt;/P&gt;
&lt;P&gt;Do you have any idea on how to do this ?&lt;/P&gt;
&lt;P&gt;Thank you !&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2025 09:33:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loading-Excel-Files-With-Prefixes-Into-Qlik/m-p/2504560#M103794</guid>
      <dc:creator>LK13</dc:creator>
      <dc:date>2025-02-05T09:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: Loading Excel Files With Prefixes Into Qlik</title>
      <link>https://community.qlik.com/t5/App-Development/Loading-Excel-Files-With-Prefixes-Into-Qlik/m-p/2504577#M103797</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;This Script should work:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;SET vPrefixes = 'AMS, BFS, MIL';&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;PrefixesTable:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;LOAD &lt;FONT color="#0000FF"&gt;Trim&lt;/FONT&gt;(SubField('$(vPrefixes)', ',')) as Prefix&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;AUTOGENERATE 1;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;STRIKE&gt;&lt;FONT face="courier new,courier" color="#999999"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/STRIKE&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;for each prefix in FieldValueList('Prefix')&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;for each file in FileList('lib://Geo_EMEA/A1 Lazar Test/$(prefix)*.xlsx')&lt;BR /&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;RESULT:&lt;BR /&gt;LOAD *&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;FROM [$(file)] (ooxml, embedded labels, table is Sheet1);&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;next file&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;next prefix&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Trim will remove the unsusefull spaces you will get with the subfield.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 08:45:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loading-Excel-Files-With-Prefixes-Into-Qlik/m-p/2504577#M103797</guid>
      <dc:creator>SRA</dc:creator>
      <dc:date>2025-02-06T08:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: Loading Excel Files With Prefixes Into Qlik</title>
      <link>https://community.qlik.com/t5/App-Development/Loading-Excel-Files-With-Prefixes-Into-Qlik/m-p/2504580#M103799</link>
      <description>&lt;P&gt;&lt;BR /&gt;SET vFileDir = '';&lt;/P&gt;
&lt;P&gt;LET vFilePrefixes = Chr(39) &amp;amp; 'AMS' &amp;amp; Chr(39) &amp;amp; ',' &amp;amp; Chr(39) &amp;amp; 'BFS' &amp;amp; Chr(39) &amp;amp; ',' &amp;amp; Chr(39) &amp;amp; 'MIL' &amp;amp; Chr(39);&lt;/P&gt;
&lt;P&gt;//if all files have same no of fields/same fields else use concat to append all files data&lt;BR /&gt;FOR EACH vPrefix IN $(vFilePrefixes)&lt;/P&gt;
&lt;P&gt;//Import_$(vPrefix)_File: - use this if you wan to load each file as different table&lt;BR /&gt;Import:&lt;BR /&gt;LOAD *&lt;BR /&gt;FROM&lt;BR /&gt;[$(vFileDir)$(vPrefix)_*.xlsx]&lt;BR /&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;
&lt;P&gt;NEXT&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2025 10:27:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loading-Excel-Files-With-Prefixes-Into-Qlik/m-p/2504580#M103799</guid>
      <dc:creator>Qrishna</dc:creator>
      <dc:date>2025-02-05T10:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Loading Excel Files With Prefixes Into Qlik</title>
      <link>https://community.qlik.com/t5/App-Development/Loading-Excel-Files-With-Prefixes-Into-Qlik/m-p/2504748#M103830</link>
      <description>&lt;P&gt;Hi SRA,&lt;/P&gt;
&lt;P&gt;This script you provided first works perfect: (where Trim actually did great job)&lt;/P&gt;
&lt;P&gt;SET vPrefixes = 'AMS, BFS, MIL';&lt;/P&gt;
&lt;P&gt;PrefixesTable:&lt;BR /&gt;LOAD Trim(SubField('$(vPrefixes)', ',')) as Prefix&lt;BR /&gt;AUTOGENERATE 1;&lt;/P&gt;
&lt;P&gt;for each prefix in FieldValueList('Prefix')&lt;BR /&gt;for each file in FileList('lib://Geo_EMEA/A1 Lazar Test/$(prefix)*.xlsx')&lt;BR /&gt;LOAD *&lt;BR /&gt;FROM [$(file)] (ooxml, embedded labels, table is Sheet1);&lt;BR /&gt;next file&lt;BR /&gt;next prefix&lt;/P&gt;
&lt;P&gt;// *****************************&lt;/P&gt;
&lt;P&gt;But this one does not work:&lt;/P&gt;
&lt;P&gt;Error:&amp;nbsp;There were no fields to load in the given source.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 08:28:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loading-Excel-Files-With-Prefixes-Into-Qlik/m-p/2504748#M103830</guid>
      <dc:creator>LK13</dc:creator>
      <dc:date>2025-02-06T08:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Loading Excel Files With Prefixes Into Qlik</title>
      <link>https://community.qlik.com/t5/App-Development/Loading-Excel-Files-With-Prefixes-Into-Qlik/m-p/2504750#M103831</link>
      <description>&lt;P&gt;Hi, you are fully right! I change again to the first solution provided. Better if there is no files for one of the prefix. thanks&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 08:46:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Loading-Excel-Files-With-Prefixes-Into-Qlik/m-p/2504750#M103831</guid>
      <dc:creator>SRA</dc:creator>
      <dc:date>2025-02-06T08:46:42Z</dc:date>
    </item>
  </channel>
</rss>

