<?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: Right Function with File Name - Detect file extention in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Right-Function-with-File-Name-Detect-file-extention/m-p/1251643#M851536</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny - Worked perfectly. Will need to restudy my understanding of the ' &amp;amp; ". &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/laugh.png" /&gt;&lt;/P&gt;&lt;P&gt;Thanks for the quick help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Mar 2017 07:15:11 GMT</pubDate>
    <dc:creator>pjn123pjn123</dc:creator>
    <dc:date>2017-03-09T07:15:11Z</dc:date>
    <item>
      <title>Right Function with File Name - Detect file extention</title>
      <link>https://community.qlik.com/t5/QlikView/Right-Function-with-File-Name-Detect-file-extention/m-p/1251641#M851534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I'm struggling detecting when a file is xlsx or xls.&lt;/P&gt;&lt;P&gt;For some reason the first line also selects the *.xlsx files so I thought I would fix it by adding a IF ELSE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But my IF statement below is always FALSE. &lt;/P&gt;&lt;P&gt;It probably have something to do with my use of the right() function &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/plain.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for this forum - Really learning a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QlikView Script Code:&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14889798618505283 jive_text_macro" jivemacro_uid="_14889798618505283" modifiedtitle="true"&gt;
&lt;P&gt;let path_Alles = 'C:\Users\xxx\Desktop\xxx\*.xls';&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;for each File in filelist (path_Alles)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;SET sFile = '$(File)';&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;IF Right($(sFile),4)="xlsx" THEN&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;FindHeaderTemp:&lt;/P&gt;
&lt;P&gt;LOAD RecNo() as DataStart&lt;/P&gt;
&lt;P&gt;FROM $(File)&lt;/P&gt;
&lt;P&gt;(ooxml, no labels)&lt;/P&gt;
&lt;P&gt;WHERE A = 'Earning Year';&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;ELSE&lt;/P&gt;
&lt;P&gt;FindHeaderTemp:&lt;/P&gt;
&lt;P&gt;LOAD RecNo() as DataStart&lt;/P&gt;
&lt;P&gt;FROM $(File)&lt;/P&gt;
&lt;P&gt;(biff, no labels)&lt;/P&gt;
&lt;P&gt;WHERE @1 = 'Earning Year';&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;EndIf&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&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/Right-Function-with-File-Name-Detect-file-extention/m-p/1251641#M851534</guid>
      <dc:creator>pjn123pjn123</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Right Function with File Name - Detect file extention</title>
      <link>https://community.qlik.com/t5/QlikView/Right-Function-with-File-Name-Detect-file-extention/m-p/1251642#M851535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF Right(&lt;SPAN style="color: #ff0000;"&gt;'&lt;/SPAN&gt;$(sFile)&lt;STRONG style="color: #ff0000; font-size: 13.3333px;"&gt;'&lt;/STRONG&gt;, 4) = &lt;STRONG style="color: #ff0000; font-size: 13.3333px;"&gt;'&lt;/STRONG&gt;xlsx&lt;STRONG style="color: #ff0000; font-size: 13.3333px;"&gt;'&lt;/STRONG&gt; then&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF SubField(&lt;STRONG style="color: #ff0000; font-size: 13.3333px;"&gt;'&lt;/STRONG&gt;$(sFile)&lt;STRONG style="color: #ff0000; font-size: 13.3333px;"&gt;'&lt;/STRONG&gt;, '.', -1) = &lt;STRONG style="color: #ff0000; font-size: 13.3333px;"&gt;'&lt;/STRONG&gt;xlsx&lt;STRONG style="color: #ff0000; font-size: 13.3333px;"&gt;'&lt;/STRONG&gt; then&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2017 16:41:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Right-Function-with-File-Name-Detect-file-extention/m-p/1251642#M851535</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-03-08T16:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Right Function with File Name - Detect file extention</title>
      <link>https://community.qlik.com/t5/QlikView/Right-Function-with-File-Name-Detect-file-extention/m-p/1251643#M851536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunny - Worked perfectly. Will need to restudy my understanding of the ' &amp;amp; ". &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/laugh.png" /&gt;&lt;/P&gt;&lt;P&gt;Thanks for the quick help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2017 07:15:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Right-Function-with-File-Name-Detect-file-extention/m-p/1251643#M851536</guid>
      <dc:creator>pjn123pjn123</dc:creator>
      <dc:date>2017-03-09T07:15:11Z</dc:date>
    </item>
  </channel>
</rss>

