Share This Post

Script to Convert XLS to XLSX

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)

Share This Post

Hello and thanks for reading my blog (http://t3chn1ck.wordpress.com)! My hope is that information I post is useful to others! If you found that a solution did help you, or if you have questions, feel free to drop a comment on the post. I primarily blog on my IT experiences with ConfigMgr and desktop engineering. I am a 10 year, seasoned professional with ConfigMgr and systems management. I co-facilitate and present for the local user group in Denver, am an active blogger on topics for ConfigMgr and systems management techniques, involved in forums for Microsoft and MyITForum, and have been a speaker for events such as BDNA's SCCM Guru Webcast Series (March 2012), the Microsoft Management Summit (April 2013), and BDNA's Microsoft Master Webcast Series (Jan. 2014).

Leave a Reply

Share This Post

Script to Convert XLS to XLSX

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)

Filed under: Scripting

Share This Post

internal_server_error <![CDATA[WordPress &rsaquo; Error]]> 500