Google sheet multible ImportXMLfails

Viewed 60

I have a google sheet where I want to scrape a few stock prices, in the given example there are 5 stock prices, all 5 importXML queries work, just not at the same time, and those that do not work just give a "-" back, but there is not really a system in which there are no works, and in between they actually all work 5. I imagine it's because Google Sheet cannot handle all 5 queries at once.

The importXML look like this:

=IMPORTXML("https://www.nordnet.dk/markedet/aktiekurser/16712858-goodfood-market";"//span[@class='Typography__Span-sc-10mju41-0 efGqYn Typography__StyledTypography-sc-10mju41-1 dKBtpx StatsBox__StyledPriceText-sc-1dqlo5q-2 emzYuD']")

=IMPORTXML("https://www.nordnet.dk/markedet/aktiekurser/16100472-studsvik";"//span[@class='Typography__Span-sc-10mju41-0 efGqYn Typography__StyledTypography-sc-10mju41-1 dKBtpx StatsBox__StyledPriceText-sc-1dqlo5q-2 emzYuD']")

=IMPORTXML("https://www.nordnet.dk/markedet/aktiekurser/16874165-kahoot";"//span[@class='Typography__Span-sc-10mju41-0 efGqYn Typography__StyledTypography-sc-10mju41-1 dKBtpx StatsBox__StyledPriceText-sc-1dqlo5q-2 emzYuD']")

=IMPORTXML("https://www.nordnet.dk/markedet/aktiekurser/16886100-flexion-mobile";"//span[@class='Typography__Span-sc-10mju41-0 efGqYn Typography__StyledTypography-sc-10mju41-1 dKBtpx StatsBox__StyledPriceText-sc-1dqlo5q-2 emzYuD']")

=IMPORTXML("https://www.nordnet.dk/markedet/aktiekurser/16290321-kambi-group";"//span[@class='Typography__Span-sc-10mju41-0 efGqYn Typography__StyledTypography-sc-10mju41-1 dKBtpx StatsBox__StyledPriceText-sc-1dqlo5q-2 emzYuD']")

Does anybody have a solution on this ?

1 Answers

try:

=INDEX({
 IMPORTXML("https://www.nordnet.dk/markedet/aktiekurser/16712858-goodfood-market";
 "//span[@class='Typography__Span-sc-10mju41-0 efGqYn Typography__StyledTypography-sc-10mju41-1 dKBtpx StatsBox__StyledPriceText-sc-1dqlo5q-2 emzYuD']")\
 IMPORTXML("https://www.nordnet.dk/markedet/aktiekurser/16100472-studsvik";
 "//span[@class='Typography__Span-sc-10mju41-0 efGqYn Typography__StyledTypography-sc-10mju41-1 dKBtpx StatsBox__StyledPriceText-sc-1dqlo5q-2 emzYuD']")\ 
 IMPORTXML("https://www.nordnet.dk/markedet/aktiekurser/16874165-kahoot";
 "//span[@class='Typography__Span-sc-10mju41-0 efGqYn Typography__StyledTypography-sc-10mju41-1 dKBtpx StatsBox__StyledPriceText-sc-1dqlo5q-2 emzYuD']")\
 IMPORTXML("https://www.nordnet.dk/markedet/aktiekurser/16886100-flexion-mobile";
 "//span[@class='Typography__Span-sc-10mju41-0 efGqYn Typography__StyledTypography-sc-10mju41-1 dKBtpx StatsBox__StyledPriceText-sc-1dqlo5q-2 emzYuD']")\ 
 IMPORTXML("https://www.nordnet.dk/markedet/aktiekurser/16290321-kambi-group";
 "//span[@class='Typography__Span-sc-10mju41-0 efGqYn Typography__StyledTypography-sc-10mju41-1 dKBtpx StatsBox__StyledPriceText-sc-1dqlo5q-2 emzYuD']")})

or just a row:

=INDEX({
 IMPORTXML("https://www.nordnet.dk/markedet/aktiekurser/16712858-goodfood-market";
 "//span[@class='Typography__Span-sc-10mju41-0 efGqYn Typography__StyledTypography-sc-10mju41-1 dKBtpx StatsBox__StyledPriceText-sc-1dqlo5q-2 emzYuD']")\
 IMPORTXML("https://www.nordnet.dk/markedet/aktiekurser/16100472-studsvik";
 "//span[@class='Typography__Span-sc-10mju41-0 efGqYn Typography__StyledTypography-sc-10mju41-1 dKBtpx StatsBox__StyledPriceText-sc-1dqlo5q-2 emzYuD']")\ 
 IMPORTXML("https://www.nordnet.dk/markedet/aktiekurser/16874165-kahoot";
 "//span[@class='Typography__Span-sc-10mju41-0 efGqYn Typography__StyledTypography-sc-10mju41-1 dKBtpx StatsBox__StyledPriceText-sc-1dqlo5q-2 emzYuD']")\
 IMPORTXML("https://www.nordnet.dk/markedet/aktiekurser/16886100-flexion-mobile";
 "//span[@class='Typography__Span-sc-10mju41-0 efGqYn Typography__StyledTypography-sc-10mju41-1 dKBtpx StatsBox__StyledPriceText-sc-1dqlo5q-2 emzYuD']")\ 
 IMPORTXML("https://www.nordnet.dk/markedet/aktiekurser/16290321-kambi-group";
 "//span[@class='Typography__Span-sc-10mju41-0 efGqYn Typography__StyledTypography-sc-10mju41-1 dKBtpx StatsBox__StyledPriceText-sc-1dqlo5q-2 emzYuD']")}; 1)

enter image description here

Related