NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
Roberto83
Posts: 37
0 Kudos

Read csv file

Hi everybody,

 

I have a question. I am trying to read a csv file that has a large header (about 15 lines). After the header I have 4 rows of data. It appears that I can not use the read from spreadsheet vi; the output is just a single column.

 

I have tried the read from binary file vi as well but I can not get read of the text that forms the header (I tried it by adding the Match regular expression vi as shown in the vi I am attaching to this message). I think that if I can remove the text then I can just use the data I need. Can anybody give me a suggestion as to how to proceed here.

 

I am attaching my VI and a sample of how the data I am trying to process look (csv file) 

 

Knight of NI
Dennis_Knutson
Posts: 29,306
0 Kudos

Re: Read csv file

This is not at all a digital I/O question.

 

Just use the Read From Spreadsheet File with a comma as a delimiter. After the read, you can use Array Subset.

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page