How to pull XML data into another excel sheet using VBA?

AhmedBaksh

New Member
Joined
Apr 27, 2020
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I'm a new to this forum and I kindly need your guidance here on the below :)

I have a excel macro-enabled workbook that I want "any user" to be able to use on their desktop. This workbook can be saved on any location on the user's PC. It requires "XML" files extractions to pull in the data from.

The workbook has an "input" sheet where the user can place the file location of the xml files. The xml files will be having designated names (Example: ACT H.xml).

The button that I want the VBA to be attached to should perform the below VBA action:

1- Locate the xml file with the designated name in the location specified by the user in the main input sheet.
2- Open the xml file, copy entirely everything and paste the data in the active main excel sheet in the designated sheet "ACT H".
3- The xml file to automatically close.

I have attached the image for your reference.

Really appreciate your input as I have been trying some codes online but with no luck!
 

Attachments

  • Illustration.jpg
    Illustration.jpg
    189.9 KB · Views: 31

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,632
Latest member
jladair

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