1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As Excel.Worksheet
Dim i As Long
Dim vtemp As Variant
Set xlApp = New Excel.Application
xlApp.Visible = True
Set xlBook = xlApp.Workbooks.Open(myPath)
Set xlSheet = xlBook.Worksheets("20091103_SAP_PT1_MB5L_LISTE_DES")
xlSheet.Rows("1:5").Delete Shift:=xlUp
xlSheet.Columns("A:A").Delete Shift:=xlToLeft
xlSheet.Rows("7:9").Delete Shift:=xlUp
xlSheet.Range("A1:G6").Replace What:=" ", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
xlSheet.Range("A1:G6").Replace What:=".", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
' xlSheet.Range("B1:B6,D1:D6").NumberFormat = "0.00" <-- La mise au format Nombre ne marche pas???
xlBook.SaveAs Filename:= _
"U:\Informatique\USINE\AUTOMATE\LOGISTIQUE\MB5L_LISTE_DES_STOCKS.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False |
Partager