How can I load this "label" using importxml & xPath

Viewed 261

I've been trying to get this to load into google spreadsheet, but no success so far:

http://www.aastocks.com/tc/stocks/analysis/company-fundamental/basic-information?symbol=00027

The, I have the formula as follows:

=importxml ("http://www.aastocks.com/tc/stocks/analysis/company-fundamental/basic-information?symbol=" & To_Text(A7),"//td[@id='sb2-last']/label[@id='SQ_Last']/following-sibling::label/text()")

Result: The content imported is empty.

The html part:

<table> 
    <tbody>
        <tr> 
            <td>現價<label id="SQ_Currency">(港元)</label></td> 
            <td id="sb2-last">
                <label id="SQ_Last" class="cls">**57.500**</label>
            </td> 
        </tr> 
    </tbody>
</table>
1 Answers

try:

=INDEX(IMPORTXML(
 "http://www.aastocks.com/tc/stocks/analysis/company-fundamental/basic-information?symbol="&
 TO_TEXT(A7), "//td[@class='mcFont cls']"), 26)

enter image description here

Related