內容通常以不容易提取的表格格式在網絡上可用。 從股票價格到電視頻道列表,任何東西都可以。 GrabzIt的HTML Table to CSV服務可以提取此信息。 然後以易於閱讀的格式將其退還給您。
為此,GrabzIt提供了將HTML轉換為CSV,JSON或Excel文件的功能。 使用我們的 API or 在線截圖工具。 此外,使用Microsoft Excel或JSON格式時,可以一次提取多個表。 為找到的每個HTML表創建一個新的Excel工作表或對象。
請嘗試以下示例,以了解API如何將HTML表在線轉換為Excel。 以及JSON和CSV文件。 只需輸入包含HTML表的網頁的URL,然後單擊GrabzIt。 然後,一旦完成,代表該表的文件將被自動下載。
GrabzIt的HTML Table API支持多種編程語言。 只需從下面的選項中選擇所需的語言,即可查看代碼段和入門指南。
此代碼段指示轉換HTML表非常簡單 int或 使用ASP.NET的文檔。 剛開始轉換HTML表 下載ASP.NET庫 然後得到你的 關鍵和秘密。 最後看看 ASP.NET的API文檔 找出使用GrabzIt API的所有方法。
GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret"); TableOptions options = new TableOptions(); options.Format = TableFormat.; grabzIt.URLToTable("http://www.example.com/page-with-table.html", options); grabzIt.SaveTo("tables/result.");
此代碼段指示轉換HTML表非常簡單 int或 使用Java的文檔。 剛開始轉換HTML表 下載Java庫 然後得到你的 關鍵和秘密。 最後看看 Java API文檔 找出使用GrabzIt API的所有方法。
GrabzItClient grabzIt = new GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret"); TableOptions options = new TableOptions(); options.setFormat(TableFormat.); grabzIt.URLToTable("http://www.example.com/page-with-table.html", options); grabzIt.SaveTo("tables/result.");
此代碼段指示轉換HTML表非常簡單 int或 使用JavaScript的文檔。 開始轉換HTML表下載 GrabzIt的JavaScript庫。 然後得到你的 關鍵和秘密, 添加域 您想在其中使用JavaScript,最後查看 JavaScript的API文檔 找出使用GrabzIt API的所有方法。
<script src="https://cdn.jsdelivr.net/npm/@grabzit/js@/grabzit.min.js"></script>
<script>
GrabzIt("Sign in to view your Application Key").ConvertURL("http://www.example.com/page-with-table.html",
{"format":""}).Create();
</script>
此代碼段指示轉換HTML表非常簡單 int或 使用Node.js的文檔。 剛開始轉換HTML表 下載Node.js程序包 然後得到你的 關鍵和秘密。 最後看看 Node.js的API文檔 找出使用GrabzIt API的所有方法。
var grabzit = require('grabzit'); var client = new grabzit("Sign in to view your Application Key", "Sign in to view your Application Secret"); var options = {"format",""}; client.url_to_table("http://www.example.com/page-with-table.html", options); client.save_to("tables/result.", function (error, id){ if (error != null){ throw error; } });
此代碼段指示轉換HTML表非常簡單 int或 使用Perl的文檔。 剛開始轉換HTML表 下載Perl庫 然後得到你的 關鍵和秘密。 最後看看 Perl的API文檔 找出使用GrabzIt API的所有方法。
#!/usr/bin/perl use GrabzItClient; $grabzIt = GrabzItClient->new("Sign in to view your Application Key", "Sign in to view your Application Secret"); $options = GrabzItTableOptions->new(); $options->format(""); $grabzIt->URLToTable("http://www.example.com/page-with-table.html", $options); $grabzIt->SaveTo("tables/result.");
此代碼段指示轉換HTML表非常簡單 int或 使用PHP的文檔。 剛開始轉換HTML表 下載PHP庫 然後得到你的 關鍵和秘密。 最後看看 PHP的API文檔 找出使用GrabzIt API的所有方法。
include("GrabzItClient.php"); $grabzIt = new \GrabzIt\GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret"); $options = new \GrabzIt\GrabzItTableOptions(); $options->setFormat(""); $grabzIt->URLToTable("http://www.example.com/page-with-table.html", $options); $grabzIt->SaveTo("tables/result.");
此代碼段指示轉換HTML表非常簡單 int或 使用Python的文檔。 剛開始轉換HTML表 下載Python庫 然後得到你的 關鍵和秘密。 最後看看 Python的API文檔 找出使用GrabzIt API的所有方法。
from GrabzIt import GrabzItClient grabzIt = GrabzItClient.GrabzItClient("Sign in to view your Application Key", "Sign in to view your Application Secret") options = GrabzItTableOptions.GrabzItTableOptions() options.format = "" grabzIt.URLToTable("http://www.example.com/page-with-table.html", options) grabzIt.SaveTo("tables/result.")
此代碼段指示轉換HTML表非常簡單 int或 使用我們的REST API的文檔。 還檢查了 REST API的API文檔 有關自定義表格提取的更多方法。
https://api.grabz.it/services/convert?key=Sign in to view your Application Key&format=&url=http%3A%2F%2Fwww.example.com%2Fpage-with-table.html
此代碼段指示轉換HTML表非常簡單 int或 使用Ruby的文檔。 剛開始轉換HTML表 下載Ruby Gem 然後得到你的 關鍵和秘密。 最後看看 Ruby的API文檔 找出使用GrabzIt API的所有方法。
require 'grabzit' grabzItClient = GrabzIt::Client.new("Sign in to view your Application Key", "Sign in to view your Application Secret") options = GrabzIt::TableOptions.new() options.format = "" grabzItClient.url_to_table("http://www.example.com/page-with-table.html", options) grabzItClient.save_to("tables/result.")