+ Reply to Thread
Results 1 to 2 of 2

Import Xml using XPATH

  1. #1
    Registered User
    Join Date
    06-25-2014
    Location
    Falkirk, Scotland
    MS-Off Ver
    Office Excel 2013
    Posts
    31

    Import Xml using XPATH

    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"]


    A B C
    1 URL Title Price
    2 http://www.amazon.co.uk/dp/B0094J1MBO
    3 http://www.amazon.co.uk/dp/B0094J1MH8
    4 http://www.amazon.co.uk/dp/B00F3B476O
    5 http://www.amazon.co.uk/dp/B00F3B48WW

    Thanks folks!

  2. #2
    Registered User
    Join Date
    05-04-2005
    Posts
    8

    Re: Import Xml using XPATH

    I am having trouble getting it to work in the Google spreadsheets and would prefer to do this in Excel, too.
    =value(importXml(F7,ʺ//span[@id='priceblock_ourprice']ʺ)) // where f7 has the URL (It was working last year with =value(importXml(F7,ʺ//b[@class='priceLarge']ʺ)))

    The XML for the price also has class="a-size-medium a-color-price"

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Web Scrape Using Xpath
    By Keashan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-03-2014, 05:51 AM
  2. Using XPath with ID, not a path
    By derlee in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-22-2013, 08:00 AM
  3. XPath.SetValue
    By DevCom in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-15-2012, 09:27 AM
  4. Problem with XPath.SetValue
    By sys_daw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-31-2009, 09:24 AM
  5. XML & XPATH in EXCEL
    By raman1111 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-27-2008, 01:13 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1