Sub Fichier_Import()
Dim dir_import As String, fichierOpus As String, temp As String, copie As Worksheet, i As Long
dir_import = "C:\TEMPO\" 'ici mettre le vrai nom du chemin du dossier
Application.ScreenUpdating = False
With ActiveSheet
fichierOpus = .Cells(4, 4).Value & "_" & .Cells(1, 1).Value & .Name
.Copy
End With
temp = dir_import & fichierOpus
Set copie = ActiveSheet
With copie.UsedRange
'transforme en valeurs seules
.Value = .Value
'boucle sur les colonnes
For i = .Cells(6, Columns.Count).End(xlToLeft).Column To 1 Step -1
'si la cellule en ligne 9 est vide alors on supprime la colonne
If Len(.Cells(9, i)) = 0 Then
.Cells(9, i).EntireColumn.Delete
End If
Next
End With
ActiveWorkbook.SaveAs temp, FileFormat:=xlNormal
ActiveWorkbook.Close True
MsgBox "fichier crée avec succès"
End Sub