Question

Reading CSV Files

  • 2 December 2013
  • 3 replies
  • 1 view

Badge
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

3 replies

Userlevel 4
Badge +13
Hi Ian,

 

 

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

 

 

Itay
Userlevel 2
Badge +17
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
Badge
Super - thanks very much ... looks just the ticket.

Reply