<?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 Load fields from xlsx files with condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-fields-from-xlsx-files-with-condition/m-p/809801#M471390</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm loading two xlsx files from directory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First file have one field Date&lt;/P&gt;&lt;P&gt;Second file Have one field YearMonth.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to make one field Year, by function Year(Date) from first file and Right(YearMonth,4) from second.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Script:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;SET ThousandSep=' ';&lt;/P&gt;&lt;P&gt;SET DecimalSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyThousandSep=' ';&lt;/P&gt;&lt;P&gt;SET MoneyDecimalSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyFormat='# ##0,00р.;-# ##0,00р.';&lt;/P&gt;&lt;P&gt;SET TimeFormat='h:mm:ss';&lt;/P&gt;&lt;P&gt;SET DateFormat='DD.MM.YYYY';&lt;/P&gt;&lt;P&gt;SET TimestampFormat='DD.MM.YYYY h:mm:ss[.fff]';&lt;/P&gt;&lt;P&gt;SET MonthNames='янв;фев;мар;апр;май;июн;июл;авг;сен;окт;ноя;дек';&lt;/P&gt;&lt;P&gt;SET DayNames='Пн;Вт;Ср;Чт;Пт;Сб;Вс';&lt;/P&gt;&lt;P&gt;LET vToDay = today(1)-1; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Directory;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR Each File in filelist ('*.xlsx')&lt;/P&gt;&lt;P&gt;&amp;nbsp; Main:&lt;/P&gt;&lt;P&gt;&amp;nbsp; LOAD&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt; if(SubStringCount(FileBaseName(),'Date')=1, Year(Date), &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(SubStringCount(FileBaseName(),'YearMonth')=1, Left(YearMonth,4) )) as Year&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; FROM&lt;/P&gt;&lt;P&gt;&amp;nbsp; '$(File)'&lt;/P&gt;&lt;P&gt; (ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;NEXT File;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in result i have error:&lt;/P&gt;&lt;P&gt;Field not found &amp;lt;YearMonth&amp;gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to solve this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Mar 2015 13:17:27 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-03-16T13:17:27Z</dc:date>
    <item>
      <title>Load fields from xlsx files with condition</title>
      <link>https://community.qlik.com/t5/QlikView/Load-fields-from-xlsx-files-with-condition/m-p/809801#M471390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm loading two xlsx files from directory.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First file have one field Date&lt;/P&gt;&lt;P&gt;Second file Have one field YearMonth.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to make one field Year, by function Year(Date) from first file and Right(YearMonth,4) from second.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My Script:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;SET ThousandSep=' ';&lt;/P&gt;&lt;P&gt;SET DecimalSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyThousandSep=' ';&lt;/P&gt;&lt;P&gt;SET MoneyDecimalSep=',';&lt;/P&gt;&lt;P&gt;SET MoneyFormat='# ##0,00р.;-# ##0,00р.';&lt;/P&gt;&lt;P&gt;SET TimeFormat='h:mm:ss';&lt;/P&gt;&lt;P&gt;SET DateFormat='DD.MM.YYYY';&lt;/P&gt;&lt;P&gt;SET TimestampFormat='DD.MM.YYYY h:mm:ss[.fff]';&lt;/P&gt;&lt;P&gt;SET MonthNames='янв;фев;мар;апр;май;июн;июл;авг;сен;окт;ноя;дек';&lt;/P&gt;&lt;P&gt;SET DayNames='Пн;Вт;Ср;Чт;Пт;Сб;Вс';&lt;/P&gt;&lt;P&gt;LET vToDay = today(1)-1; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Directory;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR Each File in filelist ('*.xlsx')&lt;/P&gt;&lt;P&gt;&amp;nbsp; Main:&lt;/P&gt;&lt;P&gt;&amp;nbsp; LOAD&lt;/P&gt;&lt;P&gt; &lt;STRONG&gt; if(SubStringCount(FileBaseName(),'Date')=1, Year(Date), &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(SubStringCount(FileBaseName(),'YearMonth')=1, Left(YearMonth,4) )) as Year&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; FROM&lt;/P&gt;&lt;P&gt;&amp;nbsp; '$(File)'&lt;/P&gt;&lt;P&gt; (ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;NEXT File;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in result i have error:&lt;/P&gt;&lt;P&gt;Field not found &amp;lt;YearMonth&amp;gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to solve this problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 13:17:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-fields-from-xlsx-files-with-condition/m-p/809801#M471390</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-03-16T13:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: Load fields from xlsx files with condition</title>
      <link>https://community.qlik.com/t5/QlikView/Load-fields-from-xlsx-files-with-condition/m-p/809802#M471391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are using the same Load statement for both files, even though they have different fields.&lt;/P&gt;&lt;P&gt;File_Date.xslx does not have YearMonth field &lt;/P&gt;&lt;P&gt;File_YearMonth.xslx does not have Date field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 13:56:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-fields-from-xlsx-files-with-condition/m-p/809802#M471391</guid>
      <dc:creator>Ralf-Narfeldt</dc:creator>
      <dc:date>2015-03-16T13:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: Load fields from xlsx files with condition</title>
      <link>https://community.qlik.com/t5/QlikView/Load-fields-from-xlsx-files-with-condition/m-p/809803#M471392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Best thing would be to load them separately, as you need to manipulate them differently.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Directory;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FileDate:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD *, Year(Date) As Year;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD Date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FROM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;File_Date.xlsx&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;(ooxml, embedded labels, table is Sheet1);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FileYM:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD *, Left(YearMonth,4) As Year;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD YearMonth&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FROM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;File_YearMonth.xlsx&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;(ooxml, embedded labels, table is Sheet1);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 14:10:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-fields-from-xlsx-files-with-condition/m-p/809803#M471392</guid>
      <dc:creator>Ralf-Narfeldt</dc:creator>
      <dc:date>2015-03-16T14:10:50Z</dc:date>
    </item>
  </channel>
</rss>

