transport XML file info to Excel file

Annahda

New Member
Joined
May 4, 2020
Messages
1
Office Version
  1. 2019
Platform
  1. Windows
Hello,
I work for a shipping company. I need some help with transferring some data on xml files to a specific parts in worksheets. In the drive link I am attaching there is a a file called blank. In the blank worksheet there are texts that are highlighted yellow in the NOC, Invoice and DO sheets. I need some way to add info to the yellow highlighted of these cells with info present in the xml code in the "Sheet3" of the file. I want a way so that I can do this with only putting the "AGAINTS HBL NO:- " in the cell of the NOC sheet and the other info with automatically be placed according the respective names . Can please someone help me? Excel - Google Drive
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Welcome

You could start by importing the XML data as shown below. Where is the HBL information on the XML table?

VBA Code:
Sub Anna()
Application.CutCopyMode = 0
ActiveWorkbook.Worksheets.Add
With ActiveSheet.QueryTables.Add _
(Connection:="FINDER;C:\Users\Edu\Desktop\XML.xml", Destination:=Range("$A$1"))
    .Name = "XML"
    .FieldNames = True
    .RowNumbers = False
    .RefreshOnFileOpen = False
    .BackgroundQuery = True
    .RefreshPeriod = 0
    .WebSelectionType = xlAllTables
    .WebDisableRedirections = False
    .Refresh BackgroundQuery:=False
End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,449
Members
448,966
Latest member
DannyC96

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