Dim xlObj As Object, xlFile, lastRow as long
Dim csvFile As String
csvFile = "C:\Ipaymetrics.csv"
xlFile = "C:\Ipaymetrics.xls"
Set xlObj = CreateObject("Excel.Application")
xlObj.Workbooks.Open xlFile
With xlObj
lastRow=.Usedrange.rows.count
.Range("A" & lastrow).Select
.Selection.EntireRow.Delete
End With
xlObj.ActiveWorkbook.SaveAs csvFile, FileFormat:=6, CreateBackup:=False
xlObj.Application.DisplayAlerts = False
xlObj.Quit
Set xlObj = Nothing