{"id":6048,"date":"2017-10-27T17:57:03","date_gmt":"2017-10-27T15:57:03","guid":{"rendered":"https:\/\/www.sheetgo.com\/?p=6048"},"modified":"2017-10-27T17:57:03","modified_gmt":"2017-10-27T15:57:03","slug":"import-html-table-to-google-sheets","status":"publish","type":"post","link":"https:\/\/www.sheetgo.com\/pt\/blog\/google-sheets-features\/import-html-table-to-google-sheets\/","title":{"rendered":"Importar tabelas da Web para o Planilhas Google"},"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;][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.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p>We all know how resourceful Google Sheets application has become in our daily life. While it is extremely good with all the basic and advanced spreadsheet needs, it also lets us connect with the outside information with ease. For instance, if we need to<em><strong><span>\u00a0<\/span><\/strong><\/em>import a web HTML table to Google Sheets, it has a native function called as<span>\u00a0<\/span><a href=\"https:\/\/support.google.com\/docs\/answer\/3093339?hl=en\" target=\"_blank\" rel=\"noopener noreferrer\">IMPORTHTML<\/a>\u00a0formula. Here\u2019s the syntax:<\/p>\n<p><span><strong>IMPORTHTML(url, query, index)<\/strong><\/span><\/p>\n<ul>\n<li><span><strong>url<\/strong><\/span>\u00a0\u2013 this is the address (link\/URL) to the HTML page on the web, where the table or list that we are looking to import is located.\u00a0This can either be a fully qualified URL string like<span>\u00a0<\/span><strong>\u201chttps:\/\/en.wikipedia.org\/wiki\/Demographics_of_the_world\u201d<\/strong>. Or it can be a reference to a cell (like B1) where the URL is stored.<\/li>\n<li><span><strong>query<\/strong><\/span>\u00a0\u2013 this will be either \u201clist\u201d or \u201ctable\u201d depending upon which HTML structure contains the data we are trying to import.<\/li>\n<li><span><strong>index<\/strong><\/span> \u2013 the index number that uniquely identifies the list or table within the HTML page. Please note that the indexes for both lists and tables are treated separately. Both a table and list can exist with the same index number.<\/li>\n<\/ul>\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.2&#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; global_module=&#8221;50460&#8243; saved_tabs=&#8221;all&#8221; global_colors_info=&#8221;{}&#8221; 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; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<h3>Example: import a web HTML table to Google Sheets<\/h3>\n<p>Please consider the image below. B3 is the cell where we are entering the IMPORTHTML formula. On the web page where the URL (mentioned above) takes us, we are rather interested in the second table. Hence we\u2019re going to use \u201ctable\u201d for<span>\u00a0<\/span><span><strong>query<\/strong><\/span><span>\u00a0<\/span>parameter and 2 for<span>\u00a0the\u00a0<\/span><span><strong>index<\/strong><\/span><span>\u00a0<\/span>parameter.<\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/10\/Import-Tables-from-the-web-to-Google-Sheets-Illustration-1.png&#8221; alt=&#8221;HTML Table to Google Sheets: IMPORTHTML Formula and Explanation Window&#8221; title_text=&#8221;importhtml-formula&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.23.1&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span>We make sure that the\u00a0<\/span><span><strong>url<\/strong><\/span><span>\u00a0is within double quotes and\u00a0hit the Enter key. As soon as we do that, Google Sheets tries to fetch the data. Bigger the table data, the longer it might take to finish the data import.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/10\/Import-Tables-from-the-web-to-Google-Sheets-Illustration-2.webp&#8221; alt=&#8221;HTML Table to Google Sheets: Google Sheets Fetching Data&#8221; title_text=&#8221;fetch-data-google-sheets&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span>While the data import is in progress, the cell B3 looks like it\u00a0is holding an error value. Please note a little red triangle on the top right corner of the cell. But, it is not an actual error, but a transient state. To confirm, we can hover the mouse on the cell B3, to see the description as shown below.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/10\/Import-Tables-from-the-web-to-Google-Sheets-Illustration-3.png&#8221; alt=&#8221;HTML Table to Google Sheets: Snapshot of Data Loading&#8221; title_text=&#8221;loading-data-google-sheets&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span>Once Google Sheets loads the data, the red triangle on the cell B3 disappears. We\u2019ll notice the data extends from the cell B3 to right and also further down.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/10\/Import-Tables-from-the-web-to-Google-Sheets-Illustration-4.png&#8221; alt=&#8221;HTML Table to Google Sheets: Imported Sample Data of Cities and Details&#8221; title_text=&#8221;imported-sample-data&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span>We may not know how far the data is going to extend. So, it is very important that we keep the expected real estate of the result,\u00a0clear of any preoccupied values. Otherwise, the\u00a0<\/span><a href=\"https:\/\/support.google.com\/docs\/answer\/3093339\" target=\"_blank\" rel=\"noopener noreferrer\">IMPORTHTML<\/a><span>\u00a0formula will return a\u00a0<\/span><strong>#REF!<\/strong><span>\u00a0error, as shown in the snapshot below. Please note, for the purposes of demonstration, we entered a dummy value in the cell C9.<\/span><\/p>\n<p>[\/et_pb_text][et_pb_image src=&#8221;https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/10\/Import-Tables-from-the-web-to-Google-Sheets-Illustration-5.png&#8221; alt=&#8221;HTML Table to Google Sheets: REF Error&#8221; title_text=&#8221;html-table-google-sheets&#8221; align=&#8221;center&#8221; _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][\/et_pb_image][et_pb_text _builder_version=&#8221;4.16&#8243; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;]<\/p>\n<p><span>Congratulations! We now learned how to\u00a0<\/span><em><strong>import a web HTML table to Google Sheets<\/strong><\/em><span>, by making use of the native IMPORTHTML formula! Go through the following blog post to learn how to\u00a0<\/span><a href=\"https:\/\/www.sheetgo.com\/blog\/google-sheets-features\/import-rss-feed-to-google-sheets\/\" target=\"_blank\" rel=\"noopener noreferrer\">import RSS feed to Google Sheets<\/a><span>.<\/span><\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row _builder_version=&#8221;4.27.2&#8243; _module_preset=&#8221;default&#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.27.2&#8243; _module_preset=&#8221;default&#8221; global_colors_info=&#8221;{}&#8221; theme_builder_area=&#8221;post_content&#8221;][et_pb_text admin_label=&#8221;Connections T &#8211; Automate beyond importrange &#8211; Horizontal&#8221; module_class=&#8221;sheetgo-post-no-shadow-img md2-contained-button-light vertical-banner-container&#8221; _builder_version=&#8221;4.27.2&#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;50462&#8243; theme_builder_area=&#8221;post_content&#8221;]<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2024\/09\/Add-on-sm_sheets-connected-new-connection.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 beyond Importrange<\/span><\/p>\n<p><a href=\"https:\/\/www.sheetgo.com\/connections\/\" target=\"_blank\" rel=\"noopener\">Find out how<\/a>[\/et_pb_text][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We all know how resourceful Google Sheets application has become in our daily life. While it is extremely good with all the basic and advanced spreadsheet needs, it also lets us connect with the outside information with ease. For instance, if we need to\u00a0import a web HTML table to Google Sheets, it has a native [&hellip;]<\/p>\n","protected":false},"author":40,"featured_media":6049,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_et_pb_use_builder":"on","_et_pb_old_content":"We all know how resourceful Google Sheets application has become in our daily life. While it is extremely good with all the basic and advanced spreadsheet needs, it also lets us connect with the outside information with ease. For instance, if we need to<em><strong> import a web HTML table to Google Sheets<\/strong><\/em> , it has a native function called as <a href=\"https:\/\/support.google.com\/docs\/answer\/3093339?hl=en\" target=\"_blank\" rel=\"noopener noreferrer\">IMPORTHTML<\/a>\u00a0formula. Here's the syntax:\n\n<span style=\"font-family: 'courier new', courier, monospace; font-size: 14pt;\"><strong>IMPORTHTML(url, query, index)<\/strong><\/span>\n<ul>\n \t<li><span style=\"font-size: 12pt; font-family: 'courier new', courier, monospace;\"><strong>url<\/strong><\/span>\u00a0\u2013 this is the address (link\/URL) to the HTML page on the web, where the table or list that we are looking to import is located.\u00a0This can either be a fully qualified URL string like <strong>\u201chttps:\/\/en.wikipedia.org\/wiki\/Demographics_of_the_world\u201d<\/strong>. Or it can be a reference to a cell (like B1) where the URL is stored.<\/li>\n \t<li><span style=\"font-size: 12pt; font-family: 'courier new', courier, monospace;\"><strong>query<\/strong><\/span>\u00a0\u2013 this will be either \u201clist\u201d or \u201ctable\u201d depending upon which HTML structure contains the data we are trying to import.<\/li>\n \t<li><span style=\"font-size: 12pt; font-family: 'courier new', courier, monospace;\"><strong>index<\/strong><\/span>\u00a0\u2013 the index number that uniquely identifies the list or table within the HTML page. Please note that the indexes for both lists and tables are treated separately. Both a table and list can exist with the same index number.<\/li>\n<\/ul>\n<h3>Example: import a web HTML table to Google Sheets<\/h3>\nPlease consider the image below. B3 is the cell where we are entering the IMPORTHTML formula. On the web page where the URL (mentioned above) takes us, we are rather interested in the second table. Hence we're going to use \"table\" for <span style=\"font-size: 12pt; font-family: 'courier new', courier, monospace;\"><strong>query<\/strong><\/span> parameter and 2 for <span style=\"font-size: 12pt;\"><strong><span style=\"font-family: 'courier new', courier, monospace;\">index<\/span><\/strong><\/span> parameter.\n\n<img class=\"aligncenter size-full wp-image-10735\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/10\/Import-Tables-from-the-web-to-Google-Sheets-Illustration-1.png\" alt=\"Import Tables from the web to Google Sheets - Illustration 1\" width=\"869\" height=\"652\" \/>\n\nWe make sure that the\u00a0<span style=\"font-size: 12pt; font-family: 'courier new', courier, monospace;\"><strong>url<\/strong><\/span>\u00a0is within double quotes and\u00a0hit the Enter key. As soon as we do that, Google Sheets tries to fetch the data. Bigger the table data, the longer it might take to finish the data import.\n\n<img class=\"aligncenter size-full wp-image-10737\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/10\/Import-Tables-from-the-web-to-Google-Sheets-Illustration-2.png\" alt=\"Import Tables from the web to Google Sheets - Illustration 2\" width=\"870\" height=\"653\" \/>\n\nWhile the data import is in progress, the cell B3 looks like it\u00a0is holding an error value. Please note a little red triangle on the top right corner of the cell. But, it is not an actual error, but a transient state. To confirm, we can hover the mouse on the cell B3, to see the description as shown below.\n\n<img class=\"aligncenter size-full wp-image-10738\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/10\/Import-Tables-from-the-web-to-Google-Sheets-Illustration-3.png\" alt=\"Import Tables from the web to Google Sheets - Illustration 3\" width=\"869\" height=\"652\" \/>\n\nOnce Google Sheets loads the data, the red triangle on the cell B3 disappears. We\u2019ll notice the data extends from the cell B3 to right and also further down.\n\n<img class=\"aligncenter size-full wp-image-10739\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/10\/Import-Tables-from-the-web-to-Google-Sheets-Illustration-4.png\" alt=\"Import Tables from the web to Google Sheets - Illustration 4\" width=\"869\" height=\"652\" \/>\n\nWe may not know how far the data is going to extend. So, it is very important that we keep the expected real estate of the result,\u00a0clear of any preoccupied values. Otherwise, the <a href=\"https:\/\/support.google.com\/docs\/answer\/3093339\" target=\"_blank\" rel=\"noopener noreferrer\">IMPORTHTML<\/a> formula will return a <strong>#REF!<\/strong> error, as shown in the snapshot below. Please note, for the purposes of demonstration, we entered a dummy value in the cell C9.\n\n<img class=\"aligncenter size-full wp-image-10740\" src=\"https:\/\/static.sheetgo.com\/wp-content\/uploads\/2017\/10\/Import-Tables-from-the-web-to-Google-Sheets-Illustration-5.png\" alt=\"Import Tables from the web to Google Sheets - Illustration 5\" width=\"869\" height=\"652\" \/>\n\nCongratulations! We now learned how to <em><strong>import a web HTML table to Google Sheets<\/strong><\/em>, by making use of the native IMPORTHTML formula! Please let us know if you have any questions in the comments section below.","_et_gb_content_width":"","footnotes":""},"categories":[37],"tags":[39,28],"class_list":["post-6048","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google-sheets-features","tag-connections-t","tag-spreadsheets"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/posts\/6048","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/comments?post=6048"}],"version-history":[{"count":0,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/posts\/6048\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/media\/6049"}],"wp:attachment":[{"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/media?parent=6048"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/categories?post=6048"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sheetgo.com\/pt\/wp-json\/wp\/v2\/tags?post=6048"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}