You may want to have in Excel some contents from the Internet. In some case, the basic functionalities of Excel / LibreOffice will be enough to get the data, but in most of the case, you will need more complex processing. So I wrote a simple script that will scrap the content with regular expression, xpath or css selector, and expose the results in a very simple API so that Excel / LibreOffice will be able to use it.
The script is available on github.com/rpeyron/scrap2api/ with full documentation.
A simple example to get the number of results of a google search with the different methods is provided.
- See the result in your browser: https://www.lprp.fr/demo/scrap.php/google-numresults-css/test?token=test
- Get the result in Excel / LibreOffice, use formula : =WEBSERVICE(“https://www.lprp.fr/demo/scrap.php/google-numresults-css/test?token=test”) or in French editions : =SERVICEWEB(“https://www.lprp.fr/demo/scrap.php/google-numresults-css/test?token=test”)
- See the Swagger UI of the definition of the API : https://www.lprp.fr/demo/scrap.php/openapi-ui
The script is also extensible through plugins, please refer to developer’s documentation.