Import Xml using XPATH

cfcMalky

Board Regular
Joined
Nov 5, 2013
Messages
52
Hi guys & gals

Can anyone help me here with ImportXML functions?

In the example I will use a table containing items on Amazon.co.uk
  • In column A, I will be pasting the product URL
  • In column B, I would like the title of the product to be pulled from the page linked in column A (using ImportXML/FilterXML & Xpath, or a web query that I can use right through the column)
  • In column C, I would like the current price to be pulled from the page in the same manner as the title in column B.

I've had something like this work on Google spreadsheets, but I would prefer to use Excel to do the same tasks, the Xpath syntax that I get for the title & price are as follows:

Title: //*[@id="productTitle"]
Price: //*[@id="priceblock_ourprice"]

[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD="align: center"]1
[/TD]
[TD="align: center"]URL[/TD]
[TD="align: center"]Title[/TD]
[TD="align: center"]Price[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]http://www.amazon.co.uk/dp/B0094J1MBO[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]http://www.amazon.co.uk/dp/B0094J1MH8[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]http://www.amazon.co.uk/dp/B00F3B476O[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]http://www.amazon.co.uk/dp/B00F3B48WW[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
</tbody>[/TABLE]

Thanks folks!
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Forum statistics

Threads
1,223,098
Messages
6,170,106
Members
452,302
Latest member
TaMere

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