0

I am trying to open a CSV file produced by ebay, in MS Excel 2019 where it correctly loads the foreign characters within th efile. ie "Harzstraße 25" when imported as a Text - UTF8, but where opening as an default ASCII loads "HarzstraAßE 25"; the ß substituted with Aß

I have tried the following code:

Workbooks.OpenText Filename:=filetoopen, Origin:=65001
    Set wbDownload = ActiveWorkbook

However this opens the file with the substituted ascii characters still with the Origin 65001 - UTF-8 specified seemingly being ignored / not working.

I am able to correctly open manually as query table as encoded UTF-8 using the Data / From Text/CSV process but unable to convert this to a macro that will work within the personal macro consistently and repeatedly.

Can anyone help identify the issue I am encountering or a possible working solution.

Many thanks Steve

1 Answers1

2

I found another option which has worked

Set wsDownload = ActiveWorkbook.Sheets("Import")

    With wsDownload.QueryTables.Add(Connection:="TEXT;" & filetoopen, Destination:=wsDownload.Range("A1"))
        .TextFileParseType = xlDelimited
        .TextFilePlatform = 65001
        .TextFileCommaDelimiter = True
        .Refresh
    End With

Many thanks