Delete first few rows in csv filew

How to delete more than one row in csv files?

HI,

If you need to manipulate csv file directly, the following will help you, for example.
(The following delete first 3 rows except header)

strCSV = System.Text.RegularExpressions.Regex.Replace(strCSV,"(?<=^.*\n)(.*\n){3}","")

or i f you need to handle datatable, the following will work.

Regards,

2 Likes

I will try out later, thank you so much!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.