Search code examples
arraysgoogle-sheetsweb-scrapingimportgoogle-sheets-formula

Can't import HTML or XML in google sheet


i'm new to using this function, can anyone help me getting this data from this website? (https://www.myfxbook.com/community/outlook/EURUSD) I need to import the first table, in particular i need the Long and Short %


Solution

  • try:

    =IMPORTHTML(A1, "table", 2)
    

    enter image description here

    then you can do simple extract:

    =QUERY(IMPORTHTML(A1, "table", 2), "select Col2,Col3 offset 2", 0)
    

    enter image description here