Thursday, August 29, 2013

Google Spreadsheet ImportXML Auto Refresh Cell Based on Drop Down Selection

Question:

( by JeremiahL )


Hello,

I'm having a bit of difficulty figuring out how to make my spreadsheet respond correctly. I have a range of cells which draw their value from an outside game API. Part of the script for the api allows the in-game region to be selected using a system ID. I've created a drop-down list with the system ID's I want to use and then the code for the dynamically loaded cells calls the cell which has the drop down list. The problem I'm encountering is the drop-down list doesn't refresh the values. When I first open the document, the initial cell value (first item on the list) is used in the script and changing it doesn't do anything. Can anyone explain how to cause changing the drop-down value to also refresh all of the cells that call data from that list?

The dropdown list is C2 and the code for calling the value is currently in J13. Eventually the code from J13 will be moved to all of it's proper spots on the spreadsheet, but I'm just working on that cell right now until I get it figured out. 

Thanks to anyone who can help.

Solution:


Have a look at the following screenshot:



And I have the following formula in Cell J13:
=importXML("http://api.eve-central.com/api/marketstat?usesystem="&$C2&"&typeid="&join("&typeid=";$A4:$A5);"//sell/min")


I hope the above solution will help you, and if you need more help then please do comment below on this blog itself, I will try to help you out.


I also take up private and confidential projects:
If this blog post was helpful to you, and if you think you want to help me too and make my this blog survive then please donate here: http://igoogledrive.blogspot.com/2012/09/donate.html 

Thanks,

1 comment:

  1. Hey, that worked! Thanks for your help. So it was the extra () and {} that were stopping it from auto refreshing?

    ReplyDelete