<?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 Problems with loading a csv file in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problems-with-loading-a-csv-file/m-p/360922#M705191</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I just found out that it is not the delimiter type that is an issue here. I changed the delimiter in the source file from ', to ~ and still have the same problem. The text in the field uses some kindof character that makes qlikview read it as the next field. I think it is the TAB in the text field that makes it considered as new field. Any solutions for that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Mar 2012 17:24:29 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-03-29T17:24:29Z</dc:date>
    <item>
      <title>Problems with loading a csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-loading-a-csv-file/m-p/360916#M705185</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 have a csv file that I am trying to load to my Qlikview document, however I have one of the text fields on the file that is messing up the data in the other fields. I am thinking it is seperating out the text in this one particular field if it sees a comma since I am using a .csv file. Is ther a way I can avoid this issue. Please help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2012 20:38:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-loading-a-csv-file/m-p/360916#M705185</guid>
      <dc:creator />
      <dc:date>2012-03-20T20:38:03Z</dc:date>
    </item>
    <item>
      <title>Problems with loading a csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-loading-a-csv-file/m-p/360917#M705186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi kinjal,&lt;BR /&gt;Would using the text function in your load script maybe sort out your "problem field"?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In your Load&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;BR /&gt;text(ProblemField) AS [WhateverYouWantToCallit],&lt;BR /&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2012 04:28:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-loading-a-csv-file/m-p/360917#M705186</guid>
      <dc:creator />
      <dc:date>2012-03-21T04:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with loading a csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-loading-a-csv-file/m-p/360918#M705187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check if you any other common delimiter in csv file &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sivaraj S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2012 07:06:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-loading-a-csv-file/m-p/360918#M705187</guid>
      <dc:creator>sivarajs</dc:creator>
      <dc:date>2012-03-21T07:06:21Z</dc:date>
    </item>
    <item>
      <title>Problems with loading a csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-loading-a-csv-file/m-p/360919#M705188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kinjal,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately there isn't much you can do to prevent delimiter characters appearing in a field unless this can be controlled at the point of data entry.&amp;nbsp; What I have set up in some of my QV docs is a field count check, then flag as suspicious those records which appear to have additional fields (due to extra delimiters).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, get your top row (preferable the embedded field labels, or at least a record you know is correct) as a single text string and count the number of delimiter characters (pipe characters in this example) ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ExpFields: &lt;/P&gt;&lt;P&gt;FIRST 1&lt;/P&gt;&lt;P&gt; LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; substringcount ( @1, '|' ) AS ExpectedFields&lt;/P&gt;&lt;P&gt; FROM&lt;/P&gt;&lt;P&gt; [file]&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, no labels, delimiter is ',', msq);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then create a table of suspicious rows ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SuspectRows: &lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; RecNo() as SR_MainRowRef,&lt;/P&gt;&lt;P&gt;&amp;nbsp; '&amp;nbsp; Record No: ' &amp;amp; RecNo() &amp;amp; ' has ' &amp;amp; substringcount (@1, '|' ) &amp;amp; ' fields, when ' &amp;amp; FieldValue('ExpectedFields',1) &amp;amp; ' expected.' as DQ_Comment&lt;/P&gt;&lt;P&gt; FROM&lt;/P&gt;&lt;P&gt; [file]&lt;/P&gt;&lt;P&gt; (txt, codepage is 1252, no labels, delimiter is \x7f, msq, header is 1 lines)&amp;nbsp; &lt;/P&gt;&lt;P&gt;where substringcount (@1, '|' ) &amp;lt;&amp;gt; FieldValue('ExpectedFields',1);&lt;/P&gt;&lt;P&gt;// delimiter here is a DEL character which is very unlikely to appear&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then load your data as normal ensuring you include the following field ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;, RecNo() as MainRowRef&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, join the suspicious row data as follows ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left join (data)&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt; SR_MainRowRef as MainRowRef,&lt;/P&gt;&lt;P&gt; DQ_Comment,&lt;/P&gt;&lt;P&gt; 1 as DQ_Flag&lt;/P&gt;&lt;P&gt;resident SuspectRows;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.. and drop the SuspectRows table.&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;&lt;/P&gt;&lt;P&gt;flipside&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2012 09:07:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-loading-a-csv-file/m-p/360919#M705188</guid>
      <dc:creator>flipside</dc:creator>
      <dc:date>2012-03-21T09:07:48Z</dc:date>
    </item>
    <item>
      <title>Problems with loading a csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-loading-a-csv-file/m-p/360920#M705189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I tried this... Its not working . The problem is the other data fields are misaligned in the first step of the import itself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2012 16:13:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-loading-a-csv-file/m-p/360920#M705189</guid>
      <dc:creator />
      <dc:date>2012-03-27T16:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with loading a csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-loading-a-csv-file/m-p/360921#M705190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; can you attach sample csv file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sivaraj S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2012 04:39:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-loading-a-csv-file/m-p/360921#M705190</guid>
      <dc:creator>sivarajs</dc:creator>
      <dc:date>2012-03-28T04:39:25Z</dc:date>
    </item>
    <item>
      <title>Problems with loading a csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-loading-a-csv-file/m-p/360922#M705191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I just found out that it is not the delimiter type that is an issue here. I changed the delimiter in the source file from ', to ~ and still have the same problem. The text in the field uses some kindof character that makes qlikview read it as the next field. I think it is the TAB in the text field that makes it considered as new field. Any solutions for that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2012 17:24:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-loading-a-csv-file/m-p/360922#M705191</guid>
      <dc:creator />
      <dc:date>2012-03-29T17:24:29Z</dc:date>
    </item>
    <item>
      <title>Problems with loading a csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-loading-a-csv-file/m-p/360923#M705192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This could be a carriage return character in one of the fields making Qlikview split the record into two or more lines, however when it reaches the end of the record it should see the start of the next record.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it just a handful of records being thrown out, or all of them? &lt;/P&gt;&lt;P&gt;Are you able to control the output of the csv file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could try quoting the fields (if the source system allows this) so the data in the csv looks like ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"data1","data2","data3" etc - this may work as long as there are no " characters in the data!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a text file feed with this problem on one record and it cannot be corrected in the source system so I have to feed my file through an external batch file process which replaces the CR character with an empty string, then loads as normal.&amp;nbsp; It's a nuisance but there's no other way to fix it unless you can correct it at source.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;flipside&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2012 19:15:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-loading-a-csv-file/m-p/360923#M705192</guid>
      <dc:creator>flipside</dc:creator>
      <dc:date>2012-03-29T19:15:18Z</dc:date>
    </item>
    <item>
      <title>Problems with loading a csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-loading-a-csv-file/m-p/360924#M705193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Flipside, The problem is with a handful of records only. The fields are already quoted in my file. Would you be able to send me the script for the batch file that you run. I am really stuck beause of this issue. Is there a place we can report this problem to the Qlikview tech team.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Mar 2012 13:54:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-loading-a-csv-file/m-p/360924#M705193</guid>
      <dc:creator />
      <dc:date>2012-03-30T13:54:25Z</dc:date>
    </item>
    <item>
      <title>Problems with loading a csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-with-loading-a-csv-file/m-p/360925#M705194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This isn't a Qlikview issue, it's the data.&amp;nbsp; Anyway, here's the script I am using which seems to work.&amp;nbsp; Copy and paste this into a .vbs file. It won't run by itself as it needs parameters (see my notes later on).&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;Const ForReading = 1&lt;BR /&gt;Const ForWriting = 2&lt;/P&gt;&lt;P&gt;Dim sCurPath&lt;BR /&gt;sCurPath = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName("..\")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; strFileName = sCurPath &amp;amp; Wscript.Arguments(0)&lt;BR /&gt; 'msgbox strFileName &lt;BR /&gt; &lt;BR /&gt; strOldText = Replace(Wscript.Arguments(1),"vbLf",vbLf)&lt;BR /&gt; 'strOldText = "\" &amp;amp; vbLf&lt;BR /&gt; strNewText = Wscript.Arguments(2)&lt;BR /&gt; 'strNewText = "\"&lt;/P&gt;&lt;P&gt; 'msgbox strFileName &amp;amp; " " &amp;amp;&amp;nbsp; strOldText&amp;nbsp; &amp;amp; " " &amp;amp; strNewText &lt;/P&gt;&lt;P&gt; Set objFSO = CreateObject("Scripting.FileSystemObject")&lt;BR /&gt; Set objFile = objFSO.OpenTextFile(strFileName, ForReading)&lt;/P&gt;&lt;P&gt; strText = objFile.ReadAll&lt;BR /&gt; objFile.Close&lt;BR /&gt; strNewText = Replace(strText, strOldText, strNewText)&lt;/P&gt;&lt;P&gt; Set objFile = objFSO.OpenTextFile(strFileName, ForWriting)&lt;BR /&gt; objFile.WriteLine strNewText&lt;BR /&gt; objFile.Close&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;Then use something like this in your load script ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; // Call the vbscript to remove linefeed characters in the datafeed file&lt;/P&gt;&lt;P&gt; SET vbs = "..\?????.vbs"; // path to the vbs file&lt;/P&gt;&lt;P&gt; SET LoadFile = "..\?????.csv"; //Path to file to cleanse (Filename cannot contain spaces.&amp;nbsp; )&lt;/P&gt;&lt;P&gt; SET RemoveString = "\vbLf"; //vbLf will be replaced with correct vbLf character in vbs file&lt;/P&gt;&lt;P&gt; SET NewString = "\";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; // Build command line and execute&lt;/P&gt;&lt;P&gt; LET cmdExe = 'cmd.exe /c ' &amp;amp; chr(34) &amp;amp; '$(vbs)'&amp;nbsp; &amp;amp; chr(34) &amp;amp; ' ' &amp;amp; '$(LoadFile)'&amp;amp; ' ' &amp;amp; '$(RemoveString)' &amp;amp; ' ' &amp;amp; '$(NewString)'; &lt;/P&gt;&lt;P&gt; EXECUTE $(cmdExe);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had to pass "vbLf" as a text string in the command then change this to vbLf in the .vbs file.&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, 30 Mar 2012 14:29:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-with-loading-a-csv-file/m-p/360925#M705194</guid>
      <dc:creator>flipside</dc:creator>
      <dc:date>2012-03-30T14:29:38Z</dc:date>
    </item>
  </channel>
</rss>

