Dim arg, xls, xl, book, sheet Set arg = WScript.Arguments If Arg.Count < 2 Then WScript.Quit End If xls = arg(0) maxsheet = arg(1) Set xl = Wscript.CreateObject("Excel.Application") xl.Visible = Fales xl.DisplayAlerts = Fales Set book = xl.WorkBooks.Open(xls) for i=1 to maxsheet Set sheet = book.worksheets(CInt(i)) Sheet.Activate book.SaveAs xls & "." & i & ".csv" , 6 next 'book.SaveAs "x:\filename.ext", xlCSV 'xlCSV = 6 'xlCSVMac = 22 'xlCSVMSDOS = 24 'xlCSVWindows = 23 'book.Close True xl.Quit Set xl = Nothing Set arg = Nothing