With Worksheets("nom de ta feuille").QueryTables.Add(Connection:= _ "TEXT;C:\Documents and Settings\b.gaudiche\Bureau\054E\Archives temporaires\054E-001.txt" _ , Destination:=Range("B4")) .Name = "054E-001" .FieldNames = True .RowNumbers = False .FillAdjacentFormulas = False .PreserveFormatting = True .RefreshOnFileOpen = False .RefreshStyle = xlInsertDeleteCells .SavePassword = False .SaveData = True .AdjustColumnWidth = True .RefreshPeriod = 0 .TextFilePromptOnRefresh = False .TextFilePlatform = 1252 .TextFileStartRow = 2 .TextFileParseType = xlDelimited .TextFileTextQualifier = xlTextQualifierDoubleQuote .TextFileConsecutiveDelimiter = False .TextFileTabDelimiter = True .TextFileSemicolonDelimiter = True .TextFileCommaDelimiter = False .TextFileSpaceDelimiter = False .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1) .TextFileTrailingMinusNumbers = True .Refresh BackgroundQuery:=False .Range("B5:C5").ClearContents .Range("B7:C7").ClearContents .Range("B9:C9").ClearContents .Range("K9").ClearContents .Range("B3").FormulaR1C1 = "1" .Range("B3:K9").Borders(xlDiagonalDown).LineStyle = xlNone .Range("B3:K9".Borders(xlDiagonalUp).LineStyle = xlNone End With 'etc ... (je te laisse continuer ce petit nettoyage)
ouvrir une 40aines de fichiers textes
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questiondonc je galere un peu car j'essaye chez moi et je retente en galerant sur les pc....