A voir également:
- VBA - Excel : Importation de fichier multiple .csv à .Xls
- Liste déroulante excel - Guide
- Word et excel gratuit - Guide
- Si et excel - Guide
- Déplacer une colonne excel - Guide
- Excel compter cellule couleur sans vba - Guide
1 réponse
JE viens de voir en fait qu'il y a une fonction d'importation de donnée dans excel pour les fichier text...
Quand j'enregistre la fonction, ça me donne:
Il y a surement une partie de ça qui peut servir... :)
Quand j'enregistre la fonction, ça me donne:
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:\Users\ps\Desktop\Contributions\2013-01 (janvier)\FichierQuotidienDesContributions_2013-01-03-01_00083_61634-2.csv" _
, Destination:=Range("$A$2"))
.Name = "FichierQuotidienDesContributions_2013-01-03-01_00083_61634-2"
.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 = False
.TextFileSemicolonDelimiter = True
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, _
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
ActiveWindow.SmallScroll Down:=-15
End Sub
Il y a surement une partie de ça qui peut servir... :)