UTF-8 und ANSI Daten per VBA in Excel importieren

UTF-8 Daten einlesen und zeilenweise in Array speichern

geht nur mit ADODB.Stream

Dim oFileApp As Object: Set oFileApp = CreateObject("Scripting.FilesystemObject")
Dim oStream As Object
Dim oFile As Object
Dim vDaten As Variant
Dim vName As String
//vName = "../Pfad/Datei.txt"

Set oStream = CreateObject("ADODB.Stream")
oStream.Charset = "utf-8"
oStream.Open
oStream.LoadFromFile (vName)
vDaten = oStream.ReadText()
oStream.Close
Set oStream = Nothing
Set oFileApp = Nothing
vDaten = Split(vDaten, vbCrLf)

ANSI Daten einlesen und zeilenweise in Array speichern

Dim oFileApp As Object: Set oFileApp = CreateObject("Scripting.FilesystemObject")
Dim oFile As Object
Dim vDaten As Variant
Dim vName As String
//vName = "../Pfad/Datei.txt"

Set oFile = oFileApp.OpentextFile(vName)
vDaten = Split(oFile.readall, vbCrLf)
oFile.Close
Set oFile = Nothing
Set oFileApp = Nothing