简体   繁体   English

无法将 HTML 表格导入 Google 表格

[英]Can't import HTML table into Google Sheet

I've been trying to import the "Detailed Standings" table from this page into a google sheet.我一直在尝试将此页面中的“详细排名”表导入谷歌表格。

I have been using ImportHTML like this:我一直在像这样使用 ImportHTML:

=ImportHTML(" https://www.baseball-reference.com/leagues/MLB/2018-standings.shtml ", "table", 7) =ImportHTML(" https://www.baseball-reference.com/leagues/MLB/2018-standings.shtml ", "table", 7)

The function always returns #N/A.该函数总是返回#N/A。 If you do a number less than 7 it returns one of the other tables on the page.如果您执行的数字小于 7,它将返回页面上的其他表格之一。 I tried inspecting the page source and the expanded settings do show up as having "table_number" = 7.我尝试检查页面源,扩展设置确实显示为“table_number”= 7。

I tried tooling around with ImportXML as well, but had no luck.我也尝试过使用 ImportXML 工具,但没有运气。 Is there something obvious I am missing?我有什么明显的遗漏吗?

I also tried it, found this function in sheets doesn't import dynamically loading data.我也试过了,发现工作表中的这个功能不会导入动态加载数据。

if you main aim is to import data into your sheet then embed that sheet to your site then solution i can give is如果您的主要目标是将数据导入工作表,然后将该工作表嵌入到您的网站,那么我可以提供的解决方案是

  1. Go with excel > Data > New Query > From other source > From Web > Paste link > Make connection > Select table you want and get data like PIC 1使用 excel > Data > New Query > From other source > From Web > Paste link > Make connection > Select table you want and get data like PIC 1

  2. Click LOAD and get data and embed into site or do want you want to do.单击 LOAD 并获取数据并嵌入到站点或您想要做的事情。 You can hide any column, etc from there.您可以从那里隐藏任何列等。 and import where you want and it can be interactive if you want more follow this https://youtu.be/5ViZ7aOxF3I并导入您想要的位置,如果您想要更多,它可以是交互式的,请遵循此https://youtu.be/5ViZ7aOxF3I

PIC 2图 2

If you want data in mobile, easy.如果您想要移动数据,很容易。 Install EXCEL APP and log-in with same account after uploading on your cloud account, you will get it.安装EXCEL APP,上传到云账号后使用同一个账号登录,即可获得。

Thanks!谢谢!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM