Hello:

I have some code that reads in a csv through ado.net, and writes out a new csv.

The input looks like this:

Name:  Screen Shot 02-07-18 at 08.42 AM.jpg
Views: 79
Size:  22.8 KB

My concern is only for Column A at this point.


I read the value like this:
Code:
            Dim Level As String = ""
            If IsDBNull(rs.Fields(0).Value) = False Then Level = (rs.Fields(0).Value)

I write out the value like this:

Code:
    Private Sub CreateCSVFile(ByVal _strNewCSVPath As String, ByVal _Level As String, ByVal _PN As String, ByVal _Desc As String, ByVal _Qty As Decimal, ByVal _Rev As String, ByVal _RawMatl As String, ByVal _MatlQty As Decimal, ByVal _MatlUnits As String)
        Try
            Dim objWriter As IO.StreamWriter = IO.File.AppendText(_strNewCSVPath)
            If IO.File.Exists(_strNewCSVPath) Then
                objWriter.Write(_Level & ",")
As you can see below, the A column is NOT the same string value. Something is being converted. I have not seen this in all csv files, but ran across it on one... In other words, my initial testing was flawless.

Name:  Screen Shot 02-07-18 at 08.47 AM.jpg
Views: 82
Size:  27.4 KB

Much thanks!