Bonjour,
Je voudrais savoir si quelqu'un connait le code VBA pour afficher dans la cellule "H14" la date de création d'un fichier CSV ?
J'ai un fichier CSV que je modifie comme ceci pour le mettre en forme dans un fichier excel :
With ActiveSheet.QueryTables.Add(Connection:="TEXT;\\TOTO\NBU\admin\azerty.CSV", Destination:=Range("$A$1"))
.Name = "azerty"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 65001
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = True
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
Range("H14").Select
End With
Merci par avance.
Je voudrais savoir si quelqu'un connait le code VBA pour afficher dans la cellule "H14" la date de création d'un fichier CSV ?
J'ai un fichier CSV que je modifie comme ceci pour le mettre en forme dans un fichier excel :
With ActiveSheet.QueryTables.Add(Connection:="TEXT;\\TOTO\NBU\admin\azerty.CSV", Destination:=Range("$A$1"))
.Name = "azerty"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 65001
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = True
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
Range("H14").Select
End With
Merci par avance.
Dernière édition: