IMPORTHTML function on google sheets - web-scraping

I am trying to use the IMPORTHTML function on Google Sheets to create a table that I can refresh periodically. The code I am attempting to use is =IMPORTHTML("https://www.baseball-reference.com/teams/BOS/2018.shtml","table",1), to try and get the table that says "Team Batting." However, when I do this, it gives me an error that says "Formula parse error." What am I doing wrong?

The table you want is table 10. Try this:
=IMPORTHTML("https://www.baseball-reference.com/teams/BOS/2018.shtml","table",10)

Related

google sheets webscraping , importxml fails

I have this url https://www.bloomberg.com/quote/TAGLTEC:MK
I want to scrape the 0.8225 element into my google sheets.
E58 is cell with url https://www.bloomberg.com/quote/TAGLTEC:MK
the scraping query i used was =REPLACE(E58,(E58,"//span[#class='priceText__06f600fa3e']"),1, 3, "") but it fails
Try this ...
=importxml("https://www.bloomberg.com/quote/TAGLTEC:MK","//section[#class='box main']")
and
=index(flatten(importxml("https://www.bloomberg.com/quote/TAGLTEC:MK","//section[#class='info']")),2,1)
and you will see the exact reason why there is no way to retrieve data by using importxml.

I am trying to use the Google Analytics Add-on for Google Sheets but multiple filters are not working as expected

When I use the following filters in GA custom reports, it works fine:
But when I try to implement the same in the Google Sheets add on, using the following expressions:
ga:pagePath=~/offer AND ga:pagePath!~/offer/\D+/\D+/
The result is coming as zeroes all the way. When I try ; (semi-colon) in place of AND, it gives me an error. When I try a comma, it works as expected (OR). Where am I going wrong?
The correct filter you should use in the "filters" cell in Google Sheets is
ga:pagePath=~/offer;ga:pagePath!~/offer/\D+/\D+/
no spaces no anything. semi-colon is used for AND.
Reference: https://developers.google.com/analytics/devguides/reporting/core/v3/reference#filters

Oracle eText rtf template and Extended Function

I am working on Oracle 11g NACHA eText rtf template and i am facing problems while creating this template as per Bank needs. I need help while using substring extended function in column Originating DFI Identification.
My function is like this: substr(BankAccountNumber,1,8)
But when, I test the template using template viewer i got following erorr:
[112616_130010213][][PROCEDURE] Log Level is changed to PROCEDURE
[112616_130011163][][ERROR] expression: is invalid
Time: 4.706 sec.
FO Formatting failed.
End of Process.
Anyone here can help me with this please ?
The syntax looks correct, try making it uppercase. Check to see if that tag contains any data, and that the datatype is Alpha in the etext template.

Unexpected token Error while creating view that uses pivot

I'm not able to create view in oracle through a select query that uses PIVOT function
It gives the following error.I'm not able to understand what's the problem.Please help
Refer to the image at the following address for error snapshot.The error can be seen at
following address"https://www.dropbox.com/s/sq98mvfourobo7w/Error.PNG"
I can't see your item from work (dropbox is blocked), but I ran across this issue using the create view wizard in sql developer: it would throw out an error for an unexpected token ! PIVOT.
The workaround was to simply use CREATE OR REPLACE FORCE VIEW from the SQL worksheet and avoid the wizard.

Why is ImportXML not working for a specific field while trying to scrape kickstarter.com?

I am trying to screen scrape funding status of a specific Kickstarter project.
I am using following formula in my Google spreadsheet, what I am trying here is to get the $ amount of project's funding status:
=ImportXML("http://www.kickstarter.com/projects/1904431672/trsst-a-distributed-secure-blog-platform-for-the-o","//data[#class='Project942741362']")
It returns #N/A in the cell, with comment:
error: The xPath query did not return any data.
When I try using ImportXML on other parts of the same webpage it seems to work perfectly well. Could someone please point out what I am doing wrong here?
It seems that the tag "data" is not correctly parsed.
A choice of workaround may be:
=REGEXEXTRACT(IMPORTXML("http://...", "//div[#id='pledged']"), "^\S*")

Resources