Skip to main content
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
Hi Ian,

 

 

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

 

 

Itay
Hi IanM,

 

 

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

 

Takashi
Super - thanks very much ... looks just the ticket.

Reply