moin,
hier mit importiere ich erste zwei spalten. den weiteren spalten kriege ich nicht hin :-(
Sub porting()
'Variablen definiition
Dim QuellDatei As String
Dim zeile As Integer
Dim Inhalt As String
Dim Information() As String
Dim i As Integer
ThisWorkbook.Worksheets("report").Activate
zeile = 4
QuellDatei = ThisWorkbook.Path & "\xy.csv"
Open QuellDatei For Input As #1
Do While Not EOF(1) 'schleife bis DatenEnde
Line Input #1, Inhalt
Information = Split(Inhalt, ";")
For i = 0 To UBound(Information)
If IsDate(Information(i)) Then
ActiveSheet.Cells(zeile, 1) = Information(i) 'Datum
Else
ActiveSheet.Cells(zeile, 2) = Information(i) 'produkt
End If
Next
zeile = zeile + 1
Loop
Close #1
End Sub
|