LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading .csv file with semicolon delimiter

Hi,

 

I am trying to read the attatched .csv file (attached) which is formated with the ";" delimiter.

 

When I read the file using the read delimited spreadsheet VI I get an output array with a new line created between each row of data.

 

Does anyone know why this new line is been created and how I might be able to read the file?

 

(I am able to resave the file to comma delimieted format using excel, and read successfully however my application is such that I need to read the original semicolon delimiter format)

 

Thanks,

Richard

0 Kudos
Message 1 of 9
(5,282 Views)
I'm not sure if I understand you. A linefeed is what makes a row a row. Do you means there is a extra line feed? Can you show a sample?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 9
(5,272 Views)

Heres the read output of the semicolon delimiter defined file:

 

semicolon delimiter.png 

 Heres what I want:

 

Untitled.png

0 Kudos
Message 3 of 9
(5,265 Views)

Please see message above

0 Kudos
Message 4 of 9
(5,263 Views)

The file uses the DOS end of line indicator <cr><lf>. When reading the file into LabVIEW you should enable the option "convert EOL" on the read operation to let LabVIEW convert the platform specific EOL indicator into its own native <LF> EOL indicator.

Rolf Kalbermatter
My Blog
0 Kudos
Message 5 of 9
(5,229 Views)

I changed your file to CSV Extension, It works fine.

whats the Need to have a csv file with .xls exten?

 

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 6 of 9
(5,226 Views)
I think the intent was to have a file that excel can open as well. Excel can open certain types of delimited files automatically.

As Rolf says, the issue reading the file into LabVIEW is with the EOL delimiter. Any time you see "extra" lines being inserted, be thinking EOL delimiter. Just to keep things totally confused, Windows uses a single linefeed as a delimiter, however Notepad -- which is part of Windows -- expects both a carriage return and a linefeed. If it sees a single linefeed, it ignores it and runs everything into one long string.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 7 of 9
(5,191 Views)

A slight correction:

 

Windows still generally uses <cr><lf> like DOS for ASCI text files. MacOS Classic used a <cr> and most Unix variants usually <lf>. LabVIEW as a multiplatform application had to standardize on one of them for internal use and decided for the <lf>, but the text file read and write functions have an automatic EOL conversion option. 

Rolf Kalbermatter
My Blog
0 Kudos
Message 8 of 9
(5,186 Views)

Thanks for the help!

 

After doing some more research into the file type the csv file i realised is coded using unicode.

 

Simialr to the problem here: http://forums.ni.com/t5/LabVIEW/Labview-not-reading-csv-file-properly/td-p/2855176

I was able to use the same solution

0 Kudos
Message 9 of 9
(5,145 Views)