Saving a webpage as an excel file
2 views (last 30 days)
Show older comments
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 Comment
Geoff Hayes
on 27 Nov 2015
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.
Answers (0)
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!