problème de codage d'une boucle VBA
Bonjour,
Je veux boucler ce code VBA :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| Range("a65536").Select
dernière_ligne = Selection.End(xlUp).Row
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:\Documents and Settings\Bureau\les rapports\export\Fich1.csv" _
, Destination:=Range("$A$" & dernière_ligne + 1))
.Name = "Fich1"
.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 = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = True
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
Range("A" & dernière_ligne + 1).Select
Selection.EntireRow.Delete |
En résumé je veux prendre des fichiers CSV contenu dans un même chemin, les convertir et les concaténer dans un même fichier Excel. Tout en supprimant les entêtes de ces fichiers sauf le premier.
Voilà,
Cdt,
SKIP