LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
mrsound

Read csv data into LabView

Status: Declined
Programming issue. Pushed to NI Forums for resolution.

Hi,

 

I would like a native LabView VI that can read comma delimited data (.csv) with double quotes into LabView. It needs to follow all the rules for csv files. A list can be seen here.. http://en.wikipedia.org/wiki/Comma-separated_values

 

And, NO the spreadsheet string to array function doesn't work.. There can be commas that are not separators, and line feed is not always equal to a new rows in the output array. (There can be line feeds inside cells..)

 

I tried to implement by using regular expressions and it seemed to work fine, BUT it was way too slow, making it useless. The implementation for regular expressions in LabView seems very slow, or maybe I used it the wrong way.

 

Thanks,

mrsound

6 Comments
mrsound
Member

Is anyone working on this?

 

Please help!

/ mrsound

G-Money
NI Employee (retired)

Read From Spreadsheet File can definitely read from CSV files but I don't know what's different in your particular case. This is more of a programming issue than a feature request since it's just an issue with your one file. I suggest posting your question and files to ni.com/forums so that the community and Applications Engineer can find out why you are not able to read your file correctly.

G-Money
NI Employee (retired)
Status changed to: Declined
Programming issue. Pushed to NI Forums for resolution.
mrsound
Member

Did you read my explanation? It says there that the read from spreadsheet function is not good enough since it doesn't follow the rules for CSV files. This is not a programming issue, it is a feature that I want. Excel is following all the rules and I'm sure that this would be possible for LabView too.

BruceMoyer
Member

Having this same problem.  I want to be able to automatically ignore commas in a CSV file that are surrounded by quotes.

wiebe@CARYA
Knight of NI

@mrsound wrote:
This is not a programming issue, it is a feature that I want.

The two are not mutually exclusive.

 


@mrsound wrote:
Excel is following all the rules...

Excel is following what rules? CVS is not standardized (or so says the wiki you've pointed to).

 


@mrsound wrote:
 and I'm sure that this would be possible for LabView too.

Of course. Just program it.