Hello Dear community,
I use following VBA to convert CSV to Excel . Everything works fine, but it is not showing Polish letters correct.
I need to set ISO-8859-2 as encoding. But can't figure out how
I use following VBA to convert CSV to Excel . Everything works fine, but it is not showing Polish letters correct.
I need to set ISO-8859-2 as encoding. But can't figure out how
VBA Code:
Dim xFileName As Variant
Dim rg As Range
Dim xAddress As String
xFileName = Application.GetOpenFilename(, , , False, False)
If xFileName = False Then Exit Sub
On Error Resume Next
Set rg = ThisWorkbook.Worksheets("DATA").Range("A24:A2000")
On Error GoTo 0
If rg Is Nothing Then Exit Sub
xAddress = rg.Address
With Sheets("DATA")
With .QueryTables.Add("TEXT;" & xFileName, .Range(xAddress))
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 1250
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = True
.TextFileCommaDelimiter = True
.TextFileSpaceDelimiter = False
.TextFileTrailingMinusNumbers = False
.Refresh BackgroundQuery = False
End With
End With