CSV cannot read because of wrong header row

Hi all,

I have a csv file with the following format:

_csv_version:1.0,some text, some text
ActualHeader1, ActualHeader2, ActualHeader3, …, ActualHeader50

Now I have problems reading this as CSV because the first and second row have different ammount of columns. Is there a way to ignore those 2 columns or to delete them(prepare the file for the actual CSV Read)? I cannot read the file as csv.

thanks for any help.


Can you try the following steps?

  1. Read csv file as String using Read Text file activity

  2. Remove first 2 lines. For example System.Text.RegularExpressions.Regex.Replace(text,"^.*\n.*\n","")

  3. Convert string to DataTable using Generate Datatable activity.

FYI, the following image helps you.


Thank you for your help. It did exactly what I needed.

1 Like

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