Trying to convert .xml to .xlsx

mayoung

Active Member
Joined
Mar 26, 2014
Messages
259
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
I have been searching for code to convert a .xml to .xlsx and open it. I have found several examples but when you go to open the .xlsx file it comes up with
an error file corrupted or extension does not exist or something to that regards? Can anyone help me out?

I have tried just converting without changing the file path or name. But that was unsuccessful also. I am self taught at VBA and struggle when it comes to more complexed things.
I have also tried recording the process but that produces pop ups which I do not want either. I have tried using Application.displayalerts=false but that does not help. Can someone please help me? Thank You in advance.

Current: C:\user\myoung\downloads\DataminerFile.xml

Convert to and Open File: C:\user\myoung\downloads\parts\Parts Order-081420.xlsx



And divert all popups.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
import XML into Power Query, transform (or no) as you wish then load into the worksheet
 
Upvote 0
Is there not a VBA way to convert a .xml to .xlsm? I am trying to automate this task from a button in ribbon I created?
 
Upvote 0
Is there not a VBA way to convert a .xml to .xlsm? I am trying to automate this task from a button in ribbon I created?
IMHO Power Query is much better but this is your choice what you will do
 
Upvote 0
I don't understand why open an open door, but if it works it's ok
Have a nice day ;)
 
Upvote 0

Forum statistics

Threads
1,215,799
Messages
6,126,975
Members
449,351
Latest member
Sylvine

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top