You are here:  » Start Parsing from a Specified Row/Line


Start Parsing from a Specified Row/Line

Submitted by medicalendar on Mon, 2007-07-23 18:10 in

Is there any way to tell MagicParser to start processing a .csv file from a specific line?

For example, I have a .csv file that has a bunch of unnecessary information at the top. The header row starts on line 10. How do I get MagicParser to start reading from line 10 (header row) to the end of the file?

Thanks,

Jeremy

P.S. Great script - I'm using it on several sites.

Submitted by support on Mon, 2007-07-23 18:14

Hello Jeremy,

There is an additional parameter that you can add to the format string for a CSV file which contains the number of lines to skip. For example, if you are currently using:

csv|44|1|34

...then you could use:

csv|44|1|34|10

This would begin reading from line 10.

Hope this helps!
Cheers,
David.

Submitted by medicalendar on Mon, 2007-07-23 18:17

Excellent! - Thanks for the quick reply. Is that optional parameter in the documentation? Sorry if I missed it.

Submitted by support on Mon, 2007-07-23 18:22

Hi Jeremy,

Sorry - no it's not in the documentation primarily for conciseness as it is rarely used - it was also a more recent addition. There aren't any other undocumented features - I promise!

Cheers,
David.