I am using the IMPORTHTML function in a Google Sheet cell to import prices of options for a security from a website:
=IMPORTHTML("https://www.marketwatch.com/investing/fund/spy/options","table")
The website displays the first few tables by default, while the remaining tables must be toggled SHOWN in order for the table data to be shown. The Google Sheets function imports only the default toggled tables, I would like to import all the tables if possible. Is there a method to accomplish this using the IMPORTHTML function, or is a script required?
EDIT Following the suggestion from Александр Ермолин to limit the query in the answer below I have used:
=IMPORTHTML("https://www.marketwatch.com/investing/fund/SPY/options?countrycode=US&showAll=True","table")
However, the table(s) are too large for the function, which returns Error maximum size exceeded.