Reputation: 249
I need to import multiple data values from a URL (always the same data values to import, URL can change - user inserts whatever URL she/he needs).
=IMPORTXML()
s will cause the spreadsheet to get stuck/not
import data properly for all cases.=IMPORTXML()
and paste the data to the spreadsheet, but it seems there is no parallel or generic-enough solution for complex XPaths.To have the entire html code of a URL as a string in a single cell and then query this string using =REGEXMATCH()
to find what I need.
The advantage would be that this can allow me to access the URL only once and then do the checks localy, which will make it much faster.
<html>
<head>
... <!-- all children -->
</head>
<body>
... <!-- all children -->
</body>
</html>
(in a one/several cells)
I tried using =IMPORTXML(URL,"//html")
, but it does not import the actual tags (that are required in this case for context).
Is there another way?
Upvotes: 0
Views: 2332
Reputation: 2660
You can display all the URL data using IMPORTDATA("url") In most cases I suggest limiting this using query or array_constrain as website content may be very long.
Upvotes: 2