File Exchange

image thumbnail

Get HTML Table Data into MATLAB

version 1.3.0.1 (27.6 KB) by Jeremy Barry
Identify tables and interactively select the data to bring into MATLAB.

23 Downloads

Updated 01 Sep 2016

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Through the MATLAB Web Browser tables are identified and are interactively selected and the data is imported into MATLAB as a cell array.

Cite As

Jeremy Barry (2020). Get HTML Table Data into MATLAB (https://www.mathworks.com/matlabcentral/fileexchange/22465-get-html-table-data-into-matlab), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (26)

Error.... File "mlPage.jpg" does not exist.

Named

Great work, but I have a problem about this:
Error using imread (line 349)
File "mlPage.jpg" does not exist.

Error in getTableDataScript (line 18)
im = imread('mlPage.jpg');
Thank u very much.

Very useful and helpful, but for Linux users, matlab identifies tables, columns, and lines with capital letters.
So, you need to replace all "table" for "TABLE", "td" for "TD" and "tr" for "TR". Thank you

Jan

None

Great effort.....best

wilnic

I keep getting this:

Undefined function or variable
'showToolbar'.

Error in getTableFromWeb (line 31)
activeBrowser =
com.mathworks.mde.webbrowser.WebBrowser.createBrowser(showToolbar,
showAddressBox);

I'm not sure how to solve this.
Thank you.

Error using imread (line 349)
File "mlPage.jpg" does not exist.

Error in getTableDataScript (line 15)
im = imread('mlPage.jpg');

Kevin

Raul

Thanks! It works perfect.

Song

the script doesn't work. There is no file

mlPage.jpg

Andrea

hi

this is a very usefull work! and it works great.
i have just some little problem about the type of information lead into cells:

for finance analisy's porpouse i need to have numbers into cells instead of 'char'. any ideas about how to change it?

thanks so much. anyway, great work!

Michael

not working for me. What is required version?

Great, thanks!

Grace

Great tool! I've been using it to download daily stock option price for a class assignment. So cool to have this automatically down

Sven Koerner

Great Tool!

Savas

Thanks!

Yuri K

Unfortunately does not take properly table with rowspan (probably colspan as well, I didn't test).

Yuri K

Sorry, somehow I didn't send the full comment. This is great tool and I looked for such functionality in MATLAB. One issue is that it searching for the icon in current directory. It better to store it together with the function. Use fileparts(which(mfilename)) instead of pwd.

Yuri K

Even better which(mfilename)

Don't work for me, any suggestion

>> getTableDataScript
??? Attempt to reference field of non-structure array.

Error in ==> getTableFromWeb>updateHTML at 47
pageString = reshape(url.toCharArray, 1, []);

Error in ==> getTableFromWeb at 36
newUrlText = updateHTML(urlText);

Error in ==> getTableDataScript at 14
getTableFromWeb

Anders Brun

Nice thing. Too bad the Matlab web browser doesn´t have the same functionality as other browsers though... I could not even load the page that I am most interested in importing. Then again, I could ofcourse save this page as HTML using Firefox, Safari or Explorer and then use your tool to import it into Matlab, which is nice since I don´t have to open up Excel.

Kalev

Kalev

Updates

1.3.0.1

Updated license

1.3.0.0

Added copyright tags

1.2.0.0

Changed resolution of icon location.

MATLAB Release Compatibility
Created with R2008b
Compatible with any release
Platform Compatibility
Windows macOS Linux