XML to Excel (XLSX) Visual Basic Script

Published: 12 July 2021
on channel: Roland Kinsman
1,211
7

On Error Resume Next

Set objFSO = CreateObject("Scripting.FileSystemObject")

src_file = objFSO.GetAbsolutePathName(Wscript.Arguments.Item(0))
dest_file = objFSO.GetAbsolutePathName(WScript.Arguments.Item(1))

Dim oExcel
Set oExcel = CreateObject("Excel.Application")

LoadOption = 2 ' Places the contents of the XML data file in an XML table
Dim oBook
Set oBook = oExcel.Workbooks.OpenXML(src_file, ,LoadOption)

xlsx_format = 51 ' Open XML Workbook
oBook.SaveAs dest_file,xlsx_format

oBook.Close False
WScript.Echo "Close complete"
oExcel.quit
WScript.Echo "Excel Quit complete"
Set oBook = Nothing
Set oExcel = Nothing
Set objFSO = Nothing


On this page of the site you can watch the video online XML to Excel (XLSX) Visual Basic Script with a duration of hours minute second in good quality, which was uploaded by the user Roland Kinsman 12 July 2021, share the link with friends and acquaintances, this video has already been watched 1,211 times on youtube and it was liked by 7 viewers. Enjoy your viewing!