Read table data from url

16 ビュー (過去 30 日間)
Ashley Brereton
Ashley Brereton 2021 年 7 月 18 日
回答済み: Toshiaki Takeuchi 2023 年 10 月 24 日
Hi there,
I would like to read some table data from a website. For example, the data in this website:
I've tried urlread and webread, but I am stumped.
Many thanks,
Ash

回答 (2 件)

Pavan Guntha
Pavan Guntha 2021 年 7 月 27 日
Hi Ashley,
Please go through the below MATLAB answer and File Exchange posts:
  1. http://blogs.mathworks.com/pick/2010/08/20/get-html-table-data-into-matlab/
  2. https://www.mathworks.com/matlabcentral/answers/315088-how-to-read-a-table-from-an-url
  3. https://www.mathworks.com/matlabcentral/fileexchange/59548-url-read-table
  4. https://www.mathworks.com/matlabcentral/fileexchange/29642-get-html-table-data-into-matlab-via-urlread-and-without-builtin-browser
The links mentioned above are few of the several submissions in MATLAB File Exchange on MATLAB Central which is a forum for our product users to interact, exchange information and knowledge, without MathWorks' involvement. Feel free to contact the author of this submission directly for specific questions about the implementation.
Hope this helps!

Toshiaki Takeuchi
Toshiaki Takeuchi 2023 年 10 月 24 日
url = "https://www.mathworks.com/help/matlab/text-files.html";
T = readtable(url,TableSelector="//TABLE[contains(.,'readtable')]", ...
ReadVariableNames=false)
T = 4×2 table
Var1 Var2 ________________ ___________________________________________ "readtable" "Create table from file" "writetable" "Write table to file" "readtimetable" "Create timetable from file (Since R2019a)" "writetimetable" "Write timetable to file (Since R2019a)"

カテゴリ

Help Center および File ExchangeWeb Services についてさらに検索

タグ

製品


リリース

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by