Background
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).
Problem
- Multiple
=IMPORTXML()s will cause the spreadsheet to get stuck/not import data properly for all cases. - I investigated the option to use GAS script that will work similarly to
=IMPORTXML()and paste the data to the spreadsheet, but it seems there is no parallel or generic-enough solution for complex XPaths.
Possible Solution
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.
Expectation
<html>
<head>
... <!-- all children -->
</head>
<body>
... <!-- all children -->
</body>
</html>
(in a one/several cells)
What I've tried
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?
=IMPORTXML()+ replacement of the results with their values via GAS, but by trail and error I learned that the latter can't be done in one batch, but rather 1 by one and this is time consuming. Using the UrlFetchApp class will requirescript.external_requestscope, which is also a bit of a problem due to the way my specific case is built. - Yaniv Aflalo