Saving website data as an excel file with Matlab

7 ビュー (過去 30 日間)
Jared Johnson
Jared Johnson 2015 年 11 月 22 日
コメント済み: Geoff Hayes 2015 年 11 月 24 日
Is it possible to save a webpage as an excel file via Matlab? Something similar to the websave function, which saves as a .html.
Using the import function in Excel gives me exactly what I need, but I really need this to be automated.

採用された回答

Geoff Hayes
Geoff Hayes 2015 年 11 月 22 日
Jared - can you provide an example url to a page that you wish to save to an Excel file? Perhaps you could use webread to get the data from the web page and then use xlswrite to write that data to an Excel spreadsheet.
  2 件のコメント
Jared Johnson
Jared Johnson 2015 年 11 月 22 日
No problem,
Excel import gives me the values for each stat in its own cell and it works pretty great.
Geoff Hayes
Geoff Hayes 2015 年 11 月 24 日
Hi Jared - I hadn't realized that there would be that much HTML formatting on your webpage which probably makes it difficult to parse and get to the table data.
Try using Sven Koerner's submission to the File Exchange: Get HTML-table data into MATLAB via urlread and without builtin browser. With your link I coded
tableData = getTableFromWeb_mod('http://www.cfbstats.com/2015/team/8/index.html',1);
and it created a 34x3 cell array which you can then (more easily) write to an Excel spreadsheet using xlswrite.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by