title: Getting rid of Double quotes around data in csv file in MS Access/VBA
body: <p>I want to read the entire contents of the .<code>csv</code> file and then remove the double quotes around the data. I'm not sure what most efficient way is, preferably without first writing the contents of the file into an array and using <code>replace</code></p>
  <p>TOG2021-0012;&quot;Sandbank AC145&quot;;63,8;&quot;2021-01-13 06:32&quot;;&quot;2021-01-13 06:49&quot;</p>
  <pre><code> Sub csv_import()
  
  Dim strSQL1 As String
  Dim strSQL2 As String
  Dim intNAP As Integer
  Dim intIDMaßnahme As Integer
  Dim strFieldlist As String
  Dim strDateipfad As String
  Dim strMsg As String
  Dim db As DAO.Database
  Dim rsCSV As DAO.Recordset
  Dim rsTemp As DAO.Recordset
  Dim rsTennet As DAO.Recordset
  Dim rsNeueMaßnahmen As DAO.Recordset
  Dim rsNeueRegelungsstufe As DAO.Recordset
  Dim rsImportRegelstufe_roh As DAO.Recordset
  Dim rsImportRegelstufe As DAO.Recordset
  Dim intRSCount As Integer
  Dim i As Integer
  strDateipfad = Dateiname
  If strDateipfad = vbNullString Then Exit Sub
  
  DoCmd.TransferText acImportDelim, &quot;CSVImport_Tabelle&quot;, &quot;tblCSVtemp&quot;, strDateipfad, HasFieldNames:=1
  Set db = CurrentDbC
  
  '###    erstellt temporäre Tabelle  ###
  
  If TableExists(&quot;tblRSStemp&quot;) Then DoCmd.DeleteObject acTable, &quot;tblRSStemp&quot;
  
  strFieldlist = &quot;txtMaßnahmenNR String, txtNAP String, dblRegelungsstufe Float, txtDatStart String, datDatStart Date, fkIDNAP Integer&quot;
  db.Execute &quot;CREATE TABLE tblRSStemp (&quot; &amp; strFieldlist &amp; &quot;)&quot;
  
  On Error GoTo ErrHandler
  Set rsCSV = db.OpenRecordset(&quot;tblCSVtemp&quot;)
  Set rsTemp = db.OpenRecordset(&quot;tblRSStemp&quot;)
  
  '###    zählt die Datensätze der Abfrage Location    ###
      If Not rsCSV.EOF Then
          rsCSV.MoveLast
          intRSCount = rsCSV.RecordCount
          rsCSV.MoveFirst
      Else
          intRSCount = 0
      End If
      
  '###    writes the CSV in a temporary tabel   ###
  Do While Not rsCSV.EOF
      With rsTemp
           
   ---&gt;       '##### here first get rid of double quotes for the entire file ######
          If Left(rsCSV![Einspeiser/Netzbetreiber], 6) = &quot;xyz&quot; Then
          Debug.Print &quot;ja&quot;
          .AddNew
          !txtMaßnahmenNr = rsCSV![Massnahmen-Nr]
          !txtNAP = rsCSV![Einspeiser/Netzbetreiber]
          !dblRegelungsstufe = rsCSV!Feld3
          !txtDatStart = rsCSV!Start
          !datDatStart = CDate(rsCSV!Start)
              If Right(rsCSV![Einspeiser/Netzbetreiber], 1) = &quot;6&quot; Then
                      !fkIDNAP = 1
              Else
                      !fkIDNAP = 2
              End If
          .Update
          End If
      End With
      rsCSV.MoveNext
  Loop
  </code></pre>