Option Explicit
Sub test()
Dim z As Variant, f As Variant, sh As Worksheet
Dim a As Object, d As Variant, c As Variant
d = "C:\MesDocs\Excel\MonDossier\"
z = "NomFichier.zip"
f = "NomFichier.csv"
Set sh = ActiveSheet
c = d & z
If Dir(c) = "" Then MsgBox "Fichier " & z & " absent !!!" & vbLf & _
"Fin de procédure...": Exit Sub
Set a = CreateObject("Shell.Application")
a.Namespace(d).CopyHere a.Namespace(c).items.Item(f)
With sh.QueryTables.Add(Connection:="TEXT;" & d & f, Destination:=sh.Range("A1"))
.TextFilePlatform = xlWindows
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileConsecutiveDelimiter = False
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = True
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(9, 9, 5, 9, 1)
.TextFileDecimalSeparator = ","
.Refresh BackgroundQuery:=False
.Delete
End With
'pour supprimer le fichier csv décompressé, décommenter la ligne ci-dessous
'Kill d & f
End Sub