Friday, 13 December 2013

How to save excel in 2003 format in macro

You can use below code to save the excel in xls format

Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = False
objExcel.DisplayAlerts = False
objExcel.Workbooks.Add
objExcel.Cells(1, 1).Value = "No"
objExcel.Cells(1, 2).Value = "Test_ID"
objExcel.Cells(1, 3).Value = "Test_Case_Name"
objExcel.Cells(1, 4).Value = "Test_Case_Status"
objExcel.activeWorkbook.SaveAs "c:\sagar\Report11.xls", -4143

objExcel.Quit


What do you think on above excel macro topic? Please provide your input, comments, questions on excel macro. I will try to reply as soon as possible. I value your opinion on Excel Macros.

No comments:

Post a Comment

Popular Posts

Search This Blog