How to get data from web?

조회 수: 3 (최근 30일)
Adriano
Adriano 2017년 5월 10일
댓글: Adriano 2017년 5월 11일
Hello! I need to donwload the table and the datas in this url:
I tried with "webread", "urlfilter" and "getTableDataScript" but I didn't fix the problem. Anyone can help me?
  댓글 수: 2
Jan
Jan 2017년 5월 10일
Please post your code and explain, which problems you have. It is easier to suggest a solution than to guess a problem.
Adriano
Adriano 2017년 5월 10일
편집: Adriano 2017년 5월 10일
I don't have a code. With webread I get an html that is very confused. What I need is a table in which in first column I have the names of the categories and in the second column the YTD Return%. For example:
RV China - A Shares 0.65
RV India 18.94
RV Dinamarca 14.09
and so on. How Can I do it? Thanks!

댓글을 달려면 로그인하십시오.

채택된 답변

Ned Gulley
Ned Gulley 2017년 5월 11일
URLREAD expects US-style usage of commas and stops in numbers. So in a number like 150,228.17 it will ignore the comma and return 150228.17. We should re-write URLFILTER so that it can read numbers that use commas as the decimal point, but in the meantime there is a workaround.
For financial numbers, if you are certain there will be exactly 2 digits reported after the decimal point (which appears to be the case on www.morningstar.es/), then just take the output of URLFILTER and divide by 100.
url = 'http://www.morningstar.es/es/tools/categoryoverview.aspx?filterId=-1&lang=es-ES';
name = 'RV India';
raw_price = urlfilter(url,name)
actual_price = raw_price/100
raw_price =
1974
actual_price =
19.7400
  댓글 수: 1
Adriano
Adriano 2017년 5월 11일
Many thanks Ned!!!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Web Services에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by