Sub CSV()
Application.ScreenUpdating = False
'Tempdb_J'
Workbooks.OpenText Filename:= _
"\\TO05RES03\rossejp$\Applications\CASTOR\Indicateurs CASTOR\Graphes\CSV\201207_IndicExploitTempdb_J.csv" _
, Origin:=xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier _
:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=True _
, Comma:=False, Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1) _
, Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1), Array(8, 1), _
Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1), Array(14, 1), Array(15 _
, 1), Array(16, 1), Array(17, 1), Array(18, 1), Array(19, 1), Array(20, 1), Array(21, 1), _
Array(22, 1), Array(23, 1), Array(24, 1), Array(25, 1), Array(26, 1), Array(27, 1), Array( _
28, 1), Array(29, 1), Array(30, 1), Array(31, 1), Array(32, 1)), TrailingMinusNumbers _
:=True
Range("A1:AF4").Select
Selection.Copy
Windows("TEST.xls").Activate
Sheets("DATA").Select
Range("A5").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("B6:AF8").Select
Selection.Replace What:=".", Replacement:=",", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
End With
' ci-dessous transformation au format numérique
Dim cellule As Range
For Each cellule In Range("E6:AF8")
cellule = cellule * 1
Next cellule
Windows("201207_IndicExploitTempdb_J.csv").Close
Application.ScreenUpdating = True
End Sub