Skip to main content
Question

Reading CSV Files

  • December 2, 2013
  • 3 replies
  • 9 views

Forum|alt.badge.img
I have a set of CSV files and for each of them I would just like to read in the first line of the file. Is there an easy way to do that?

 

 

I know I could read them in and use a counter and a tester to throw away all but the first line - but that would still mean that the whole of the file was read first - these are large files so I would prefer not to do that.

 

 

cheers

 

 

IanM
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

fmelizard
Safer
Forum|alt.badge.img+21
  • Safer
  • December 2, 2013
Hi Ian,

 

 

Yes , under the readers parameters > advanced, set the max features to read to 1.

 

 

Itay

takashi
Celebrity
  • December 2, 2013
Hi IanM,

 

 

"Max Features to Read" parameter of the CSV Reader might help you. Have a look at [CSV] Reader > Parameters > Advanded node in the Navigator window.

 

Takashi

Forum|alt.badge.img
  • Author
  • December 2, 2013
Super - thanks very much ... looks just the ticket.