<?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: CR/LF Issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/CR-LF-Issue/m-p/975868#M333616</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you are right - your approach is more robust and is what I would probably go for in any solution I would put into production... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Sep 2015 13:08:17 GMT</pubDate>
    <dc:creator>petter</dc:creator>
    <dc:date>2015-09-18T13:08:17Z</dc:date>
    <item>
      <title>CR/LF Issue</title>
      <link>https://community.qlik.com/t5/QlikView/CR-LF-Issue/m-p/975860#M333608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a pull from an Excel sheet. The Main Key field for the app if an alphanumeric field. For formatting reasons some of the cells with this key have a CR/LF in them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can strip this out in a Qlik expression and it works well:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replace(MyFieldName,'&lt;/P&gt;&lt;P&gt;',' ')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It doesn't work as well in the Script Editor, which is where I really need it to work, since it is a key field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you seen this before, and how have dealt with it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am going to try and fix this upstream in the ETL, but I thought I would ask here first.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Sep 2015 21:31:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/CR-LF-Issue/m-p/975860#M333608</guid>
      <dc:creator>datagrrl</dc:creator>
      <dc:date>2015-09-17T21:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: CR/LF Issue</title>
      <link>https://community.qlik.com/t5/QlikView/CR-LF-Issue/m-p/975861#M333609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;could you post the excel?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Sep 2015 21:50:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/CR-LF-Issue/m-p/975861#M333609</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-09-17T21:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: CR/LF Issue</title>
      <link>https://community.qlik.com/t5/QlikView/CR-LF-Issue/m-p/975862#M333610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The next step after loading is a Crosstable, in case that explained anything.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Sep 2015 22:04:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/CR-LF-Issue/m-p/975862#M333610</guid>
      <dc:creator>datagrrl</dc:creator>
      <dc:date>2015-09-17T22:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: CR/LF Issue</title>
      <link>https://community.qlik.com/t5/QlikView/CR-LF-Issue/m-p/975863#M333611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually the CROSSTABLE(...) LOAD seems to handle the CR LFs fine. So getting rid of them and replacing them with single space could be at a following step like you see below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2015-09-18 #1.PNG" class="jive-image image-1" src="/legacyfs/online/99304_2015-09-18 #1.PNG" style="height: auto;" /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only thing to be aware of is that the CR LFs are now considered a part of the field name and as such you will have problems with your load script if they are not consistent between subsequent reloads. If they are not a slightly more sophisticated code is needed to handle that scenario...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- petter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2015 03:40:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/CR-LF-Issue/m-p/975863#M333611</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-09-18T03:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: CR/LF Issue</title>
      <link>https://community.qlik.com/t5/QlikView/CR-LF-Issue/m-p/975864#M333612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, I think your method of removing the characters is better than me trying to paste the character. Can't believe I didn't think of that. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2015 10:32:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/CR-LF-Issue/m-p/975864#M333612</guid>
      <dc:creator>datagrrl</dc:creator>
      <dc:date>2015-09-18T10:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: CR/LF Issue</title>
      <link>https://community.qlik.com/t5/QlikView/CR-LF-Issue/m-p/975865#M333613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad to help. Could you please close the thread by marking it as answered?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2015 11:24:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/CR-LF-Issue/m-p/975865#M333613</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-09-18T11:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: CR/LF Issue</title>
      <link>https://community.qlik.com/t5/QlikView/CR-LF-Issue/m-p/975866#M333614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had to get to work before I knew if it solved my issue. It didn't work for some reason, but there is probably soemthing else wrong with the data that I haven't seen yet.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2015 11:53:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/CR-LF-Issue/m-p/975866#M333614</guid>
      <dc:creator>datagrrl</dc:creator>
      <dc:date>2015-09-18T11:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: CR/LF Issue</title>
      <link>https://community.qlik.com/t5/QlikView/CR-LF-Issue/m-p/975867#M333615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's a nice method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One issue I've had with this though is, as you pointed out, ANY change to the field renders it unrecognisable. Even if the code just gets outdented when tidying up, it will probably cause a fail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My alternative is to read the header line as data and create a mapping code line, then load the data and apply the mapping. This uses a subroutine which can be called at any point ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Sub&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;MapFields&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;tbl&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;let&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vMap&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = '';&lt;BR /&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;For&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;i&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 1 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;to&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NoOfFields&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('$(tbl)')&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;let&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vMap&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = '$(vMap)' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(i)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;gt;1,',') &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FieldName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(i)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;,'$(tbl)') &amp;amp; ' to [' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;replace&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;replace&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FieldName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(i)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;,'$(tbl)')),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;chr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(10),''),&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;chr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(13),'') &amp;amp; ']';&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Next&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;i&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Drop&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; '$(tbl)';&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;end&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sub&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt;&lt;BR /&gt;Headers: &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//Load first excel line as data (ie no header)&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;First&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; 1 &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;A&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;B&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;C&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;D&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; [BadData.xlsx] (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;ooxml&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;no&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;labels&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Sheet1);&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Call&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;MapFields&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;('Headers');&lt;BR /&gt;&lt;BR /&gt;Data: &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//Load excel without the headers&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;A&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;B&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;C&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;D&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; [BadData.xlsx](&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;ooxml&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;no&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;labels&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;header&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; 1 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;lines&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;table&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;is&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Sheet1);&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Rename&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Fields&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vMap)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;flipside&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2015 12:44:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/CR-LF-Issue/m-p/975867#M333615</guid>
      <dc:creator>flipside</dc:creator>
      <dc:date>2015-09-18T12:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: CR/LF Issue</title>
      <link>https://community.qlik.com/t5/QlikView/CR-LF-Issue/m-p/975868#M333616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you are right - your approach is more robust and is what I would probably go for in any solution I would put into production... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Sep 2015 13:08:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/CR-LF-Issue/m-p/975868#M333616</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-09-18T13:08:17Z</dc:date>
    </item>
  </channel>
</rss>

