title: Converting Microsoft XML file format to Excel file
body: <p>I have requirement that I'm not really sure on how to go about it. I have a file Doc.xml, this is in Microsoft XML format. I need to create a VB script that will change/convert the Doc.xml to Doc.xlsx, so when the user tries to open the file it will open as an Excel file. </p>
  
  <p>One of the requirements is that this script will be run from the Windows Scheduler. </p>
  
  <p>Any ideas or recommendation will be really appreciated.</p>
  
  <p>This is the script I created and is working, but when I try to change the SaveAs extension to ".csv" the file is not being saved correctly. I guess I need to find out what the code is for saving in CSV.</p>
  
  <pre><code>Dim objXLApp, objXLWb, objXLWs
  
  Set objXLApp = CreateObject("Excel.Application")
  
  objXLApp.Visible = True
  
  Set objXLWb = objXLApp.Workbooks.Open("C:\Users\jmejia\Desktop\XML_F\ZOOSHR_130622.xml")
  
  'Do nothing with File, just open it to be save agains as a new file format
  
  objXLWb.SaveAs "C:\Users\jmejia\Desktop\XML_F\ZOOSHR_130622.xlsx", 51
  
  objXLWb.Close (False)
  
  Set objXLWs = Nothing
  Set objXLWb = Nothing
  
  objXLApp.Quit
  Set objXLApp = Nothing
  </code></pre>