MS Excel nu salvează în format CSV câmpurile delimitate cu ghilimele. Acest lucru se poate realiza cu un modul VBA: se deschide MS Visual Basic cu ALT+F11, se alege din meniu Insert > Module şi se lipeşte codul de mai jos. Înainte de a rula scriptul se selectează datele pentru export.
Sub QuoteCommaExport()
Dim DestFile As String
Dim FileNum As Integer
Dim ColumnCount As Integer
Dim RowCount As Integer
DestFile = InputBox("Enter the destination filename" _
& Chr(10) & "(with complete path):", "Quote-Comma Exporter")
FileNum = FreeFile()
On Error Resume Next
Open DestFile For Output As #FileNum
If Err <> 0 Then
MsgBox "Cannot open filename " & DestFile
End
End If
On Error GoTo 0
For RowCount = 1 To Selection.Rows.Count
For ColumnCount = 1 To Selection.Columns.Count
Print #FileNum, """" & Selection.Cells(RowCount, _
ColumnCount).Text & """";
If ColumnCount = Selection.Columns.Count Then
Print #FileNum,
Else
Print #FileNum, ";";
End If
Next ColumnCount
Next RowCount
Close #FileNum
End Sub
