简体   繁体   中英

ImportXML function in Google Sheets #ERROR

Have often frequented these pages but never needed to raise a new question...

I've searched high and low for a solution to, what should be, a fairly simple ImportXML function in Google sheets and I simply cannot grab the data I'm looking for.

Companies House in the UK make their basic company data freely available in various formats. For example, for company number 06732413 (I've picked that entirely at random as a usable example), their data can be accessed at http://data.companieshouse.gov.uk/doc/company/06732413 (or alternatively at http://data.companieshouse.gov.uk/doc/company/06732413.xml , and a range of other types.)

I simply cannot find a way for ImportXML to return a specific element within that data, say the <Accounts>/<NextDueDate> data.

Is there an obvious solution?

请试试:

=index(importxml("http://data.companieshouse.gov.uk/doc/company/06732413","//*[3]/td"),3,1)

There is also a format for csv you can just use this function to pull it in:

=importdata("http://data.companieshouse.gov.uk/doc/company/06732413.csv")

note you just append .csv onto the end of the url for it to work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM