J'ai enregistré une macro macro excel permettant de convertir un fichier csv en fichier a colonne xls.
Je souhaite que cette macro demarre tous les jours a la meme heure admettons 8h00 du mat en allant chercher le fichier csv et le transformer en xls.
Voici une copie:
Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=True, Space:=False, Other:=False, TrailingMinusNumbers:=True
ActiveWindow.WindowState = xlNormal
Range("A2").Select
Columns("A:A").EntireColumn.AutoFit
ActiveWindow.FreezePanes = True
Rows("1:1").Select
Selection.AutoFilter
ChDir "C:\Documents and Settings\XXXXXX\Desktop\RAPPORT.csv"
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\XXXXXXX\Desktop\RAPPORT\RAPPORT.xls", FileFormat _
:=xlExcel9795, Password:="", WriteResPassword:="", ReadOnlyRecommended:= _
False, CreateBackup:=False
Range("K16").Select
Application.WindowState = xlMinimized
ActiveWindow.WindowState = xlNormal
End Sub
Merci pour votre aide
Je souhaite que cette macro demarre tous les jours a la meme heure admettons 8h00 du mat en allant chercher le fichier csv et le transformer en xls.
Voici une copie:
Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=True, Space:=False, Other:=False, TrailingMinusNumbers:=True
ActiveWindow.WindowState = xlNormal
Range("A2").Select
Columns("A:A").EntireColumn.AutoFit
ActiveWindow.FreezePanes = True
Rows("1:1").Select
Selection.AutoFilter
ChDir "C:\Documents and Settings\XXXXXX\Desktop\RAPPORT.csv"
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\XXXXXXX\Desktop\RAPPORT\RAPPORT.xls", FileFormat _
:=xlExcel9795, Password:="", WriteResPassword:="", ReadOnlyRecommended:= _
False, CreateBackup:=False
Range("K16").Select
Application.WindowState = xlMinimized
ActiveWindow.WindowState = xlNormal
End Sub
Merci pour votre aide