Hello,
I've attempted to use the IMPORTXML function in Google sheets to scrape the Brand Name found on a website but to no avail.
Steps I've taken include:
1. Copy the URL of the website and paste into cell A1, which is:
2. On the website, I right-click, then Inspect Element
3. I press the key combination CTRL+SHIFT+C to activate selector mode
4. I clicked on "by Hormel" which is right underneath the main title of the product. This step identifies where in the code this element exists.
5. I right click on this element
6. I enter the following function into cell B1:
Based on instructions I've seen online, I believe I have the right steps and syntax, what am I missing?
TIA
I've attempted to use the IMPORTXML function in Google sheets to scrape the Brand Name found on a website but to no avail.
Steps I've taken include:
1. Copy the URL of the website and paste into cell A1, which is:
https://www.samsclub.com/p/hormel-chili-no-beans-6-15-oz/159946
2. On the website, I right-click, then Inspect Element
3. I press the key combination CTRL+SHIFT+C to activate selector mode
4. I clicked on "by Hormel" which is right underneath the main title of the product. This step identifies where in the code this element exists.
5. I right click on this element
<span class="sc-product-header-item-number">by Hormel</span>
, then Copy, then select Copy XPath and that yields //*[@id="main"]/div/div/div[1]/div/div[2]/div[2]/div/span[1]
6. I enter the following function into cell B1:
=IMPORTXML(a1,"//*[@id="main"]/div/div/div[1]/div/div[2]/div[2]/div/span[1]")
and I get #ERROR!Based on instructions I've seen online, I believe I have the right steps and syntax, what am I missing?
TIA