Archive for August 9th, 2012
Script to Convert XLS to XLSX
Posted by N. Moseley in Scripting on August 9, 2012
Wrote this little diddy to convert an Excel 2003 file to Excel 2010 file.
' http://technet.microsoft.com/en-us/library/ff198017.aspx
Const xlExcel12 = 50
Set oExcel = CreateObject("Excel.Application")
' Set below value to false to hide the Excel window
oExcel.Visible = True
' Convert
Set oWorkbook = oExcel.Workbooks.Open("C:\filename.xls")
Set oWorksheet = oWorkbook.Worksheets(1)
oWorkbook.SaveAs "C:\filename.xlsb", xlExcel12
' End
oExcel.quit (oWorkbook.Close)


Recent Comments