Saving a webpage as an excel file
5 ビュー (過去 30 日間)
古いコメントを表示
I'm trying to save the data from this page (<http://www.cfbstats.com/2015/team/463/index.html>) into an excel document. I want the stats to show up in a individual cell.
My attempt below gets the text and removes html markup, but it puts the characters all in the first row with each idividual character per cell.
Anyone know how I can get this formatted correctly?
url = 'http://www.cfbstats.com/2015/team/463/index.html';
html = webread(url);
% Use to remove undesired markup.
txt = regexprep(html,'<script.*?/script>','');
txt = regexprep(txt,'<style.*?/style>','');
txt = regexprep(txt,'<.*?>', '');
xlswrite('test.xlsx', txt)
1 件のコメント
Geoff Hayes
2015 年 11 月 27 日
Jared - did the answer from your previous question http://www.mathworks.com/matlabcentral/answers/256842-saving-website-data-as-an-excel-file-with-matlab not work? If that is the case, then please describe why that is so rather than duplicating your original question.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Import from MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!