title: Replace 2 double quotes into 1 double quote during data load from csv file in VBA
body: <p>I loaded line from csv file into array (Open dataFilePath For Input As #1 and so on…). Loaded in array data are in 2 double quotes. Examples: “””” (empty string) , “”myText””, “”75823””. Problem is that later in the code program can’t correctly detect empty array element or other data. I found method how to replace 2 double quotes in the beginning of string and at the end of the string into 1 double quote:</p>
  
  <pre><code>For i = 0 To lastArrayIndex
      thisString = columnsDataInThisLine(i)
      theFirstStringSymbol = Left(thisString, 1)
      If theFirstStringSymbol = """" Then
          'Replace double double quotes in the string beginning and _
          'the end into single double quotes
          thisString = Mid(thisString, 2, Len(thisString) - 2) 
      End If
      columnsDataInThisLine(i) = thisString
  Next i
  </code></pre>
  
  <p>after this code I got what I need -  Examples: “” (empty string) , “myText”, “75823”, but maybe I missed something during data load from csv file (encoding or something else). Maybe it is simpler way to remove this 2 double quotes at the beginning and at the end of loaded into array strings during csv file reading? </p>