Bonjour à tous;
Comment lire à partir d'un fichier texte (.txt) avec son index et placer des données dans un fichier Excel .
voici le code mais n'est pas marché.
	
	
	
	
	
		
merci
	
		
			
		
		
	
				
			Comment lire à partir d'un fichier texte (.txt) avec son index et placer des données dans un fichier Excel .
voici le code mais n'est pas marché.
		VB:
	
	
	Sub Copy_TXT()
Dim TXT_File As String
Dim AddInName As String
AddInName = "PPR"
TXT_File = ThisWorkbook.Path & "\" & AddInName & ".TXT"
    Application.CutCopyMode = False
    With ActiveSheet.QueryTables.Add(Connection:= _
        "TEXT;TXT_File", Destination:=Range("$N$2"))
        .Name = "PPR"
        .FieldNames = True
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .PreserveFormatting = True
        .RefreshOnFileOpen = False
        .RefreshStyle = xlInsertDeleteCells
        .SavePassword = False
        .SaveData = True
        .AdjustColumnWidth = True
        .RefreshPeriod = 0
        .TextFilePromptOnRefresh = False
        .TextFilePlatform = 850
        .TextFileStartRow = 1
        .TextFileParseType = xlDelimited
        .TextFileTextQualifier = xlTextQualifierDoubleQuote
        .TextFileConsecutiveDelimiter = False
        .TextFileTabDelimiter = True
        .TextFileSemicolonDelimiter = False
        .TextFileCommaDelimiter = False
        .TextFileSpaceDelimiter = False
        .TextFileColumnDataTypes = Array(1, 1, 1)
        .TextFileTrailingMinusNumbers = True
        .Refresh BackgroundQuery:=False
    End With
End Sub
	merci