🔗 Google Sheets import examples

Importxml Examples in Google Sheets

Import structured data from web pages using XPath. This page gives a clear pattern, five practical examples and common mistakes to avoid.

Updated 2026-06-125 practical examplesCopy-ready formulas

Syntax or pattern

Import structured data from web pages using XPath.

=IMPORTXML(url, xpath_query)
✍️

5 practical examples

1

Import a source table

Bring a table from another spreadsheet into the current file.

=IMPORTRANGE(A1, "Data!A:E")

Adjust the ranges, criteria and sheet names to match your workbook.

2

Import and filter rows

Clean imported data before it reaches the dashboard.

=QUERY(IMPORTRANGE(A1, "Data!A:E"), "select Col1, Col2 where Col5 > 0", 1)

Adjust the ranges, criteria and sheet names to match your workbook.

3

Import a web table

Pull a table from a public web page.

=IMPORTHTML(A1, "table", 1)

Adjust the ranges, criteria and sheet names to match your workbook.

4

Import CSV data

Bring CSV data from a URL into a sheet.

=IMPORTDATA(A1)

Adjust the ranges, criteria and sheet names to match your workbook.

5

Import market data

Pull a current market attribute into a model or tracker.

=GOOGLEFINANCE("NASDAQ:GOOG", "price")

Adjust the ranges, criteria and sheet names to match your workbook.

Common mistakes to avoid

  • Changing source sheet permissions or range names after building formulas.
  • Importing entire sheets when only a few columns are needed.
  • Depending on web imports that may change structure.

FAQ

What is this Google Sheets page for?

This page gives copy-ready examples for importxml examples so you can understand the pattern and adapt it to real spreadsheet work.

Can I copy these formulas directly?

Yes. Use the copy buttons, then adjust sheet names, ranges, criteria and column references for your own file.

Why does my formula return an error?

The most common causes are mismatched ranges, missing quotes around text criteria, blank source data, or references that do not match your sheet layout.

💡 Useful resources

Here are some ideas for you

Optional resources that may help if you are learning Google Sheets, building trackers, creating dashboards or improving spreadsheet workflows.

  • 📘
    Google Sheets books

    Learn formulas, workflows and dashboards with structured examples.

    See ideas
  • 📊
    Spreadsheet dashboard books

    Improve how you design trackers, summaries and reporting sheets.

    See ideas
  • ⌨️
    Keyboard shortcut guides

    Build speed with navigation, editing and formatting shortcuts.

    See ideas
  • 🔢
    Numeric keypads

    Useful if you enter numbers often on a laptop or compact keyboard.

    See ideas
  • 🖥️
    External monitors

    Helpful for viewing data, formulas and dashboards side by side.

    See ideas
  • 📒
    Desk notebooks

    Sketch formulas, tracker layouts and reporting ideas before building.

    See ideas

Some links in this section may be affiliate links. Choose only what is useful for your own work.