• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 505
  • Last Modified:

CSV file reader when some fields are quoted and some are not quoted

Using VB.NET, what is the best way to extract from a CSV file where some fields have quotes and some do not have quotes?  I would prefer not to use schema.ini.

Thank you
Tom Sage
Tom Sage
1 Solution
How about remove the quotes at the beginning?

        Dim fileContents As String
        fileContents = My.Computer.FileSystem.ReadAllText("C:\Test.csv").Replace("""", "")
        ' Continue with parsing here ...
Tom SageAuthor Commented:
Good suggestion.  thanks for your help.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now