Use web tools to process data in calc

Hi, I want to take cell strings and use them as a variable in a web address and then return the first result to the next column.

So for example, I didn’t have much trouble taking a pile of Japanese words and automatically sorting them into one cell each, removing duplicates, and removing the blank row gaps. But now I want to apply each word into this web search:

http://m.jisho.org/words?jap=[VARIABLE]&eng=&dict=edict&romaji=on

and then print the first result (unique selector: “body > p:nth-child(6)” in firefox development mode) to the next column over. The desired result obviously being a document which automatically takes a pile of japanese words, sorts them, and then provides an english translation from jisho.org.

So for example, for a3 it would search

http://m.jisho.org/words?jap=yusa&eng=&dict=edict&romaji=on

and return the result for yusai, the closest match, and print

油彩 (yusai) Common word, Noun oil painting

to b3.

How do I do this?

Thank you very much for your help, I can’t find any information on doing this through searches.

You could experiment with the WEBSERVICE() function, but that returns the entire page so you’ll need to use FIND() or SEARCH() on it. If there was a parameter to the URI to return XML instead of HTML you could use FILTERXML() to extract XPath data.

The issue with FILTERXML() is that it has a pending bug XMLpath in FIlterxml does not work with arrayfunction