<?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: .csv Import error in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/csv-Import-error/m-p/210422#M42137</link>
    <description>&lt;P&gt;And for a slightly better answer&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// make a CSV file with nuls in a field
filename = savetextfile("$temp/nuls.csv",chartoblob("a,b,c~0D~0A1.1,~00~00~00,1.2~0D~0A2.1,~00~00~00,2.2"));

// load the file into a blob so we can clean it up
blobdata = loadtextfile(filename,blob);

// convert the blob to text so we can manipulate the nuls as ~00
textdata = blobtochar(blobdata);
write("\!nbefore = ", textdata);

// fix it up, convert nul to SYMBOL FOR NULL (U+2400)
// https://www.fileformat.info/info/unicode/char/2400/index.htm
// replace ~00 with three byte UTF-8 sequence for a printable character
substitute into(textdata,"~00","~E2~90~80");
write("\!n after = ", textdata);

// convert it back to a blob, handling the ~0D and ~0A that remain
repairedblobdata = Char To Blob(textdata,	"ascii~hex");

// at this point, you could save it (like above) or open it from memory:
dt = open(repairedblobdata,"text"); // tell JMP to interpret the blob as a CSV text file&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="the diagonal NUL is a single Unicode character" style="width: 591px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/17417iB027A8B20C2FC043/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="the diagonal NUL is a single Unicode character" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;the diagonal NUL is a single Unicode character&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;It's really hard to talk about the real nul character that won't print and tends to break things and the printable character 2400 that isn't ~00 but shows a nice graphic that suggests it might be ~00. I'll make my font smaller now.&lt;/P&gt;</description>
    <pubDate>Thu, 23 May 2019 20:38:28 GMT</pubDate>
    <dc:creator>Craige_Hales</dc:creator>
    <dc:date>2019-05-23T20:38:28Z</dc:date>
    <item>
      <title>.csv Import error</title>
      <link>https://community.jmp.com/t5/Discussions/csv-Import-error/m-p/210192#M42098</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;UL&gt;&lt;P&gt;New JMP user here. I'm just trying to import data from a .csv and I'm getting this error:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="image.png" style="width: 312px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/17371i37DD71C7D36EA4E5/image-dimensions/312x210?v=v2" width="312" height="210" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/UL&gt;&lt;P&gt;The original data in the .csv looks like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="image.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/17372i25E9626918487AFC/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;UL&gt;&lt;P&gt;This is how it imports using best guess:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="image.png" style="width: 420px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/17373i4BF52A9C003F4E5C/image-dimensions/420x387?v=v2" width="420" height="387" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/UL&gt;&lt;UL&gt;&lt;P&gt;This is how it imports as plain text:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="image.png" style="width: 462px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/17375iD888ABEB95B77F14/image-dimensions/462x433?v=v2" width="462" height="433" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/UL&gt;&lt;P&gt;Does anyone know what's going on?&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 19:39:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/csv-Import-error/m-p/210192#M42098</guid>
      <dc:creator>Rob1</dc:creator>
      <dc:date>2019-05-22T19:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: .csv Import error</title>
      <link>https://community.jmp.com/t5/Discussions/csv-Import-error/m-p/210210#M42100</link>
      <description>&lt;P&gt;The issue is clearly the barcode values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use the text import wizard instead of the default settings. Change the data type for the barcode column to character and see if it reads the file better. First, let's get all the data into a table. Then we can worry about what to do with barcodes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 19:37:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/csv-Import-error/m-p/210210#M42100</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2019-05-22T19:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: .csv Import error</title>
      <link>https://community.jmp.com/t5/Discussions/csv-Import-error/m-p/210229#M42101</link>
      <description>&lt;P&gt;Thanks for the advice Mark.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've gone ahead and used the text import wizard. I've tried all the different charsets and none of them seem to help. Also, the wizard doesn't seem to have a way to change the charset of just one specific column. Is there another way of doing that? It seems like it's having an issue deliminating after the first barcode value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 343px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/17379i49BA398BA955192A/image-dimensions/343x340?v=v2" width="343" height="340" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 21:13:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/csv-Import-error/m-p/210229#M42101</guid>
      <dc:creator>Rob1</dc:creator>
      <dc:date>2019-05-22T21:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: .csv Import error</title>
      <link>https://community.jmp.com/t5/Discussions/csv-Import-error/m-p/210232#M42103</link>
      <description>&lt;P&gt;I found it on the next page. I'll see if I can set to "character". Note: If I exclude this column, it seems to exclude every data cell that comes after it. Like it doesn't see the comma after the first barcode value.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 700px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/17382iEE530B7A347C7ABC/image-dimensions/700x51?v=v2" width="700" height="51" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 371px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/17380iC3DDD202CFC25711/image-dimensions/371x342?v=v2" width="371" height="342" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 21:30:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/csv-Import-error/m-p/210232#M42103</guid>
      <dc:creator>Rob1</dc:creator>
      <dc:date>2019-05-22T21:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: .csv Import error</title>
      <link>https://community.jmp.com/t5/Discussions/csv-Import-error/m-p/210244#M42105</link>
      <description>&lt;P&gt;It successfully imports in Excel, and it reads the barcodes as just empty spaces. I can save this as an excel file and then import it into JMP, but I'd prefer to avoid that step if possible since there's a whole bunch of data files and I'll be using live data in the future.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 383px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/17381i8CF3E27848C509DF/image-dimensions/383x167?v=v2" width="383" height="167" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2019 21:24:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/csv-Import-error/m-p/210244#M42105</guid>
      <dc:creator>Rob1</dc:creator>
      <dc:date>2019-05-22T21:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: .csv Import error</title>
      <link>https://community.jmp.com/t5/Discussions/csv-Import-error/m-p/210365#M42126</link>
      <description>&lt;P&gt;If you have JMP 14, try using Multiple File Import.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use this to peek at the file and see the problem characters in hex&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;blob = loadtextfile("$Downloads\data_LCS.csv",blob(readlength(1000)));
write(char(blob));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;Char To Blob( "Q1~09Q2~09Q3~09Q4~09Q5~09Q6&lt;/STRONG&gt; ...&lt;/P&gt;
&lt;P&gt;will tell us more about the data if the 1000, above, is long enough to include a barcode value. In this example, the ~09 is a TAB character separating fields.&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2019 14:06:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/csv-Import-error/m-p/210365#M42126</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2019-05-23T14:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: .csv Import error</title>
      <link>https://community.jmp.com/t5/Discussions/csv-Import-error/m-p/210404#M42132</link>
      <description>&lt;P&gt;This is what it shows for the blob:&lt;/P&gt;&lt;P&gt;In Notepad++ they show as NULL characters&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 250px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/17412iF8FC83A987967515/image-dimensions/250x378?v=v2" width="250" height="378" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 555px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/17413i163907B30C624EAC/image-dimensions/555x43?v=v2" width="555" height="43" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2019 18:06:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/csv-Import-error/m-p/210404#M42132</guid>
      <dc:creator>Rob1</dc:creator>
      <dc:date>2019-05-23T18:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: .csv Import error</title>
      <link>https://community.jmp.com/t5/Discussions/csv-Import-error/m-p/210411#M42135</link>
      <description>&lt;P&gt;Yes, the nul characters are a problem. Here's a possible workaround:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// make a CSV file with nuls in a field
filename = savetextfile("$temp/nuls.csv",chartoblob("a,b,c~0D~0A1.1,~00~00~00,1.2~0D~0A2.1,~00~00~00,2.2"));

// load the file into a blob so we can clean it up
blobdata = loadtextfile(filename,blob);

// convert the blob to text so we can manipulate the nuls as ~00
textdata = blobtochar(blobdata);
write("\!nbefore = ", textdata);

// fix it up, convert nul to space
substitute into(textdata,"~00"," ");
write("\!n after = ", textdata);

// convert it back to a blob, handling the ~0D and ~0A that remain
repairedblobdata = Char To Blob(textdata,	"ascii~hex");

// at this point, you could save it (like above) or open it from memory:
dt = open(repairedblobdata,"text"); // tell JMP to interpret the blob as a CSV text file
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;JMP strings are limited to 2GB, so if you have extremely large files this will not work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2019 19:30:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/csv-Import-error/m-p/210411#M42135</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2019-05-23T19:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: .csv Import error</title>
      <link>https://community.jmp.com/t5/Discussions/csv-Import-error/m-p/210422#M42137</link>
      <description>&lt;P&gt;And for a slightly better answer&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// make a CSV file with nuls in a field
filename = savetextfile("$temp/nuls.csv",chartoblob("a,b,c~0D~0A1.1,~00~00~00,1.2~0D~0A2.1,~00~00~00,2.2"));

// load the file into a blob so we can clean it up
blobdata = loadtextfile(filename,blob);

// convert the blob to text so we can manipulate the nuls as ~00
textdata = blobtochar(blobdata);
write("\!nbefore = ", textdata);

// fix it up, convert nul to SYMBOL FOR NULL (U+2400)
// https://www.fileformat.info/info/unicode/char/2400/index.htm
// replace ~00 with three byte UTF-8 sequence for a printable character
substitute into(textdata,"~00","~E2~90~80");
write("\!n after = ", textdata);

// convert it back to a blob, handling the ~0D and ~0A that remain
repairedblobdata = Char To Blob(textdata,	"ascii~hex");

// at this point, you could save it (like above) or open it from memory:
dt = open(repairedblobdata,"text"); // tell JMP to interpret the blob as a CSV text file&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="the diagonal NUL is a single Unicode character" style="width: 591px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/17417iB027A8B20C2FC043/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="the diagonal NUL is a single Unicode character" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;the diagonal NUL is a single Unicode character&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;It's really hard to talk about the real nul character that won't print and tends to break things and the printable character 2400 that isn't ~00 but shows a nice graphic that suggests it might be ~00. I'll make my font smaller now.&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2019 20:38:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/csv-Import-error/m-p/210422#M42137</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2019-05-23T20:38:28Z</dc:date>
    </item>
  </channel>
</rss>

