Convert XML Files to Excel

Jali1992

New Member
Joined
Apr 24, 2018
Messages
9
Hi Guys,

Just wondering if anyone knows how I can convert XML files to EXCEL format easily?

Thanks.

Jay
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hi Try with the below code
Code:
Public Sub Jali1992()


Application.DisplayAlerts = False


Dim objFSO As Object
Dim objFolder As Object
Dim objFile As Object


xmlFolder = "'Give your source folder path"
convFolder = "'Destinatioon folder path"




Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(xmlFolder)
For Each objFile In objFolder.Files
    If UCase(Right(objFile.Name, Len(XML))) = UCase(XML) Then
        NewFileName = convFolder & objFile.Name & "_conv.xlsx"


        Set ConvertThis = Workbooks.Open(objFolder & "\" & objFile.Name)
        ConvertThis.SaveAs Filename:=NewFileName, FileFormat:= _
        xlOpenXMLWorkbook
        ConvertThis.Close
    End If
Next objFile
End Sub

Regards
Dhruv
 
Upvote 0
Hi Guys, the problem I am having is that I am working on a SQL database, and the data is in a BLOB, this blob is in just XML text, which I need to convert 1000's of rows of data into Excel, is there any way to do this?
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,624
Latest member
gregg777

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