{"id":2660,"date":"2021-04-01T16:05:00","date_gmt":"2021-04-01T14:05:00","guid":{"rendered":"https:\/\/importsheet.com\/?p=2660"},"modified":"2025-06-16T21:33:02","modified_gmt":"2025-06-16T19:33:02","slug":"importxml-formula-google-sheets","status":"publish","type":"post","link":"https:\/\/www.sheetgo.com\/fr\/blog\/google-sheets-formulas\/importxml-formula-google-sheets\/","title":{"rendered":"Comment utiliser la formule IMPORTXML dans Google Sheets ?"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; admin_label=&#8221;section&#8221; module_class=&#8221;sheetgo-post&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221; da_is_popup=&#8221;off&#8221; da_exit_intent=&#8221;off&#8221; da_has_close=&#8221;on&#8221; da_alt_close=&#8221;off&#8221; da_dark_close=&#8221;off&#8221; da_not_modal=&#8221;on&#8221; da_is_singular=&#8221;off&#8221; da_with_loader=&#8221;off&#8221; da_has_shadow=&#8221;on&#8221; da_disable_devices=&#8221;off|off|off&#8221;][et_pb_row admin_label=&#8221;row&#8221; _builder_version=&#8221;4.16&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;4.16&#8243; custom_padding=&#8221;|||&#8221; global_colors_info=&#8221;{}&#8221; custom_padding__hover=&#8221;|||&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><b>The <\/b><a href=\"https:\/\/support.google.com\/docs\/answer\/3093342\" target=\"_blank\" rel=\"noopener\"><b>IMPORTXML<\/b><\/a><b> Google Sheets function lets you import data<\/b><span style=\"font-weight: 400;\"> from structured data types like HTML and XML. It also supports data import from CSV, TSV, RSS and ATOM XML feeds. This makes it a great tool to import data from websites for web scraping or data mining.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2>Syntax<\/h2>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.24.1&#8243; border_width_left=&#8221;4px&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>=IMPORTXML(url, xpath_query<span style=\"font-weight: 400;\">, locale<\/span>)<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>url<\/b><span style=\"font-weight: 400;\"> \u2013 the address of the structured web page from which you want to import data. There are two ways to include this:<\/span>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">As a fully qualified location in the form of text between quotations (for example, \u201chttps:\/\/en.wikipedia.org\/wiki\/Tiger_Woods\u201d)<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">As a reference to a cell that holds the url.<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>xpath_query<\/b><span style=\"font-weight: 400;\"> \u2013 this is the XPath query to run on the structured data. Simply put, this specifies the information we are trying to fetch. For instance, using \u201c\/\/h1\/@id\u201d gives all the id attributes within the anchor &lt;h1&gt; tags on the page. <\/span><a href=\"https:\/\/www.w3schools.com\/xml\/xpath_syntax.asp\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Check out XPath syntax guidelines<\/span><\/a><span style=\"font-weight: 400;\"> for detailed instructions.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">If this is new to you, you may be a bit confused when looking at the <b>xpath_query<\/b> parameter. But it is just as powerful as it is confusing, so we encourage you to look into it.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_text admin_label=&#8221;Connections T &#8211; Automate between spreadsheets &#8211; Horizontal&#8221; module_class=&#8221;sheetgo-post-no-shadow-img md2-contained-button-light vertical-banner-container&#8221; _builder_version=&#8221;4.27.4&#8243; _module_preset=&#8221;default&#8221; background_color=&#8221;#f2f7ff&#8221; max_width=&#8221;700px&#8221; module_alignment=&#8221;center&#8221; max_height=&#8221;300px&#8221; custom_margin=&#8221;20px|0px|20px|0px|true|true&#8221; custom_padding=&#8221;25px|25px|25px|25px|true|true&#8221; sticky_limit_bottom=&#8221;section&#8221; border_radii=&#8221;on|20px|20px|20px|20px&#8221; border_width_all=&#8221;1px&#8221; border_color_all=&#8221;#d9e7ff&#8221; saved_tabs=&#8221;all&#8221; global_colors_info=&#8221;{}&#8221; global_module=&#8221;255443&#8243; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/09\/run-automatically-connect-sheet-icons.webp\" width=\"250\" height=\"168\" alt=\"\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/09\/Recommended-for-Google-Workspace-badge.webp\" width=\"150\" height=\"180\" alt=\"39\" \/><\/p>\n<p><span style=\"font-size: 22px; font-weight: 600;\">Automate data transfers between spreadsheets<br \/><\/span><\/p>\n<p><a href=\"https:\/\/www.sheetgo.com\/connections\/\" target=\"_blank\" rel=\"noopener\">Find out how<\/a><\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>IMPORTXML example<\/h3>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.24.1&#8243; border_width_left=&#8221;4px&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>=IMPORTXML(url, &#8220;all the hyperlink titles in the page&#8221;)<\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span style=\"font-weight: 400;\">In the example below, I import the data into cell B3, so that\u2019s the destination to include in the formula.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/IMPORTXML-1.png&#8221; alt=&#8221;IMPORTXML 1&#8243; title_text=&#8221;IMPORTXML 1&#8243; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; custom_padding=&#8221;||0px|||&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span style=\"font-weight: 400;\">The formula I used included the url in quotations as previously mentioned. It uses the Xpath query \u201c\/\/a\/@title\u201d to <strong>fetch all the hyperlink titles within the article<\/strong>.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Give the formula a try! You will be warned that the spreadsheet is trying to send and receive data, just allow it to get all the information.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><b>=IMPORTXML(<\/b><b>&#8220;<\/b><b>https:\/\/en.wikipedia.org\/wiki\/Tiger_Woods<\/b><b>&#8220;<\/b><b>, <\/b><b>&#8220;\/\/a\/@title&#8221;<\/b><b>)<\/b><\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span style=\"font-weight: 400;\">Below is what you\u2019ll see as Google Sheets tries to fetch the data. The higher the number of nodes in the structured data file, the longer it will take to import the data.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/04\/2.-IMPORTXML-loading-data-500&#215;300-1.png&#8221; alt=&#8221;importxml google sheets 2&#8243; title_text=&#8221;2. IMPORTXML loading data 500&#215;300&#8243; align=&#8221;center&#8221; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span style=\"font-weight: 400;\">While the data import is in progress, the cell in which you typed the formula looks like it generated an error.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">However, it isn\u2019t an error, but just a temporary state. This means that the data is loading. Hover your mouse over the cell to see the following description.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/04\/3.-IMPORTXML-loading-data-error-500&#215;300-1.png&#8221; alt=&#8221;importxml google sheets 3&#8243; title_text=&#8221;3. IMPORTXML loading data error 500&#215;300&#8243; align=&#8221;center&#8221; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>As soon as Google Sheets loads the data, the error disappears. You\u2019ll notice the data extends from the formula cell (B3) to the right and further down.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/IMPORTXML-4.png&#8221; alt=&#8221;IMPORTXML 4&#8243; title_text=&#8221;IMPORTXML 4&#8243; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span style=\"font-weight: 400;\"><strong>This is an auto expanding function<\/strong>, meaning all the values fetched will be included in the cells below it.<\/span><\/p>\n<p>It\u2019s important that you <strong>keep the expected area of the result clear<\/strong> of any values. Otherwise, IMPORTXML formula will result in a #REF! error.<\/p>\n<p>For example, the following image demonstrates what happens if you have any values within that range.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/IMPORTXML-5.png&#8221; alt=&#8221;IMPORTXML 5&#8243; title_text=&#8221;IMPORTXML 5&#8243; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.16&#8243; border_width_left=&#8221;4px&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]=IMPORTXML(url cell reference, \u201call the h2 headers in the page\u201d)[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>In this example, in the cell B1, I have stored the <b>url<\/b> to the page from which I am trying to import the header information.<\/p>\n<p>I\u2019ll use that cell as a reference in the IMPORTXML formula:\u00a0<\/p>\n<p>[\/et_pb_text][et_pb_text module_class=&#8221;spreadsheet-function&#8221; _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><b>=IMPORTXML(B1,\u201d\/\/h2\u2033)<\/b><\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2021\/10\/IMPORTXML-6.png&#8221; alt=&#8221;IMPORTXML 6&#8243; title_text=&#8221;IMPORTXML 6&#8243; _builder_version=&#8221;4.16&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span style=\"font-weight: 400;\">As you can see, the data being pulled here is different from the previous example, even though the URL is the same.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This time, I have a list of the headers in the article. This could be useful for a variety of reasons. If there\u2019s other information that you want to import from the URL, I encourage you to read more about <\/span><a href=\"https:\/\/www.w3schools.com\/xml\/xpath_syntax.asp\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">XPath queries<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2><span style=\"font-weight: 400;\">Importxml could not fetch url<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Naturally, this error message in Google Sheets usually means that there was a problem fetching the data.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This error can occur due to various reasons, such as:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Invalid URL<\/b><span style=\"font-weight: 400;\">: Double-check that the URL provided in the IMPORTXML function is correct.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Network issues<\/b><span style=\"font-weight: 400;\">: Sometimes, this error may be the result of temporary network issues. Just wait a bit and try again.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Access restrictions<\/b><span style=\"font-weight: 400;\">: The website you&#8217;re trying to access may have restrictions in place. If this is the case, there is not much to do unless you can request access.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Page structure changes<\/b><span style=\"font-weight: 400;\">: If the function worked before but structure of the page changes, the XPath query may no longer work correctly. Update the XPath query to match the new structure of the webpage.<\/span><\/li>\n<\/ol>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.24.1&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h2><span style=\"font-weight: 400;\">A wrap-up on IMPORTXML<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">You can also check out the following blog post to learn how to pull data into Google Sheets from a table or a list on an HTML page with the <\/span><a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/importhtml-formula-google-sheets\/\"><span style=\"font-weight: 400;\">IMPORTHTML Google Sheets function <\/span><\/a><span style=\"font-weight: 400;\">or <\/span><a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-formulas\/importfeed-formula-google-sheets\/\"><span style=\"font-weight: 400;\">How to use the IMPORTFEED formula.<\/span><\/a><\/p>\n<p>[\/et_pb_text][et_pb_text _builder_version=&#8221;4.22.2&#8243; background_color=&#8221;#f9f9ff&#8221; custom_margin=&#8221;40px||40px||false|false&#8221; custom_padding=&#8221;15px|25px|15px|25px|true|true&#8221; border_width_left=&#8221;3px&#8221; border_color_left=&#8221;#808e95&#8243; saved_tabs=&#8221;all&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><em><strong>Editor\u2019s note<\/strong>: This is a revised version of a previous post that has been updated for accuracy and comprehensiveness.<\/em><\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The IMPORTXML Google Sheets function lets you import data from structured data types like HTML and XML. It also supports data import from CSV, TSV, RSS and ATOM XML feeds. This makes it a great tool to import data from websites for web scraping or data mining.Syntax=IMPORTXML(url, xpath_query, locale) url \u2013 the address of the [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":33478,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_et_pb_use_builder":"on","_et_pb_old_content":"The <a href=\"https:\/\/support.google.com\/docs\/answer\/3093342\">IMPORTXML<\/a> formula in Google Sheets lets us import data from the structured data types like HTML and XML. It also supports data import from CSV, TSV, and RSS and ATOM XML feeds.\n<h3>Syntax<\/h3>\n<span style=\"font-size: 14pt;\"><strong><span style=\"font-family: courier new,courier,monospace;\">IMPORTXML(url, xpath_query)<\/span><\/strong><\/span>\n<ul>\n \t<li><span style=\"font-size: 12pt; font-family: courier new,courier,monospace;\"><strong>url<\/strong><\/span> - this is the address (uniform resource locator) to the structured page on the web, from which we are trying to import data from.\u00a0This can take two forms.\n<ul>\n \t<li>A valid and fully qualified location in the form of text (enclosed in double quotes). For example: <strong>\u201chttps:\/\/en.wikipedia.org\/wiki\/Tiger_Woods\u201d<\/strong><\/li>\n \t<li>Or it can be a reference to a cell (like <strong>B1<\/strong>) within Google Sheets, where the url is stored.<\/li>\n<\/ul>\n<\/li>\n \t<li><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>xpath_query<\/strong><\/span> - this is the XPath query to run on the structured data. Simply put, this specifies what kind of information we are trying to fetch. For instance, using <strong><span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\">\"\/\/h1\/@id\"<\/span><\/strong> as <span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>xpath_query<\/strong><\/span>, gives us to all the id attributes within the anchor <h1> tags available on the page. For XPath syntax guidelines, check out this <a href=\"https:\/\/www.w3schools.com\/xml\/xpath_syntax.asp\">link<\/a>.<\/li>\n<\/ul>\n<h3>Usage: IMPORTXML Formula<\/h3>\n<h5>Case # 1: IMPORTXML(url,\"all the hyper link titles in the page\")<\/h5>\nIn the\u00a0snapshot below, we are trying to import the data into the cell B3, which therefore becomes the destination to key in the IMPORTXML formula.\n\n<img class=\"aligncenter size-full wp-image-2669\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/importxml1.png\" alt=\"IMPORTXML Formula - Illustration 1\" width=\"656\" height=\"351\" \/>\n\nWe ensure the <span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>url<\/strong><\/span>\u00a0is valid, i.e. enclose <span style=\"font-family: courier new,courier,monospace; font-size: 12pt;\"><strong>url<\/strong><\/span> within double quotes and\u00a0hit the Enter key. Below\u00a0is what we see as Google Sheets tries to fetch the data. Higher the number of nodes in the structured data file, the longer it might take to finish the data import.\n\n<img class=\"aligncenter size-full wp-image-2670\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/importxml2.png\" alt=\"IMPORTXML Formula - Illustration 2\" width=\"453\" height=\"133\" \/>\n\nWhile the data import is in progress, the cell in which we keyed in the formula, looks like it\u00a0returned an error. Please note a little red speck on the top right corner of the cell. But, it isn\u2019t an error, just a transient state. Hover the mouse on the cell, to see the following description.\n\n<img class=\"aligncenter size-full wp-image-2671\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/importxml3.png\" alt=\"IMPORTXML Formula - Illustration 3\" width=\"553\" height=\"183\" \/>\n\nAs soon as Google Sheets loads the data, the red speck disappears. You\u2019ll notice the data extends from the formula cell (B3) to right and also further down.\n\n<img class=\"aligncenter size-full wp-image-2672\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/importxml4.png\" alt=\"IMPORTXML Formula - Illustration 4\" width=\"654\" height=\"563\" \/>\n\nSo, it is of utmost importance that we keep the expected real estate of the result,\u00a0clear of any preoccupied values. Otherwise, IMPORTXML formula might cough up a #REF! error. For example, following image explains what could happen, if we had any values, for instance, in cell B9.\n\n<img class=\"aligncenter size-full wp-image-2673\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/importxml5.png\" alt=\"IMPORTXML Formula - Illustration 5\" width=\"552\" height=\"242\" \/>\n<h5>Case # 2: IMPORTXML(url cell reference,\"all the h2 headers in the page\")<\/h5>\nHere, in the cell B1, we have stored the <strong>url<\/strong> to the page from which we are trying to import the header information. So, we\u2019ll use that cell to refer in the IMPORTXML formula.\n\n<img class=\"aligncenter size-full wp-image-2674\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/11\/importxml6.png\" alt=\"IMPORTXML Formula - Illustration 6\" width=\"453\" height=\"410\" \/>\n\n\u00a0","_et_gb_content_width":"","footnotes":""},"categories":[54],"tags":[39,28],"class_list":["post-2660","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google-sheets-formulas","tag-connections-t","tag-spreadsheets"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/posts\/2660","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/comments?post=2660"}],"version-history":[{"count":0,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/posts\/2660\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/media\/33478"}],"wp:attachment":[{"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/media?parent=2660"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/categories?post=2660"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sheetgo.com\/fr\/wp-json\/wp\/v2\/tags?post=2660"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}