Alphae
Blue Republic RvB - BLUE Republic
4
|
Posted - 2014.12.26 16:12:01 -
[1] - Quote
Hey guys, I'm having the same difficulties as you guys so i tried Steve's script (thank you!) I modified the script just a bit to get the system info instead of the region; I also got rid of rows I didn't want and kept only Buy Volume, Sell Volume, And min Sell. I just changed these parts :
function loadPrices(priceIDs,systemID,cachebuster){ if (typeof systemID == 'undefined'){ systemID=30000142; //Jita }
...
var url="http://api.eve-central.com/api/marketstat?cachebuster="+cachebuster+"&usesystem="+systemID+"&typeid=";
...
rows[i].getChild("buy").getChild("volume").getValue(), rows[i].getChild("sell").getChild("volume").getValue(), rows[i].getChild("sell").getChild("min").getValue()];
This is working nicely, but I'm having a couple of issues with the spreadsheet I'm working on :
- I cannot do more than 159 calls with the functions, after that it gives me an #ERROR! : If I use : =loadPrices('trade sheet'!B4:B163,30000142,1) >>> It works If I use : =loadPrices1('trade sheet'!B4:B164,30000142,1) >>> It doesn't
Request failed for http://api.eve-central.com/api/marketstat?cachebuster=1&usesystem=30000142 returned code 414 / Truncated server response: URL length exceeds the configured limit of 2048 characters (Use muteHttpExceptions option to examine full response). (line 29).
line 29 is : var xmlFeed = UrlFetchApp.fetch(url+cleanTypeIds.join("&typeid="), parameters).getContentText();
- I cannot use vlookup to fetch the ID from the "price load" sheet, to get the price sell. It returns an #ERROR! :
I use this formula : =VLOOKUP(B4,price load!A:D,4,FALSE)
B4 : is the Type ID (fetched from another sheet. formula in B4 is : =iferror(vlookup(A4,TypeID!B:C,2,FALSE),"Error") A4 : is the name of the Item on the 'price load' sheet : A is the Type ID, B is buy volume, C is sell volume, and D is sell min
So basically I want the vlookup to check the ID on sheet X, check it on sheet Y and returns the min sell which is in column D. It keeps saying #N/A : Did not find value '22448' in VLOOKUP evaluation.
I tried the same vlookup process on non dynamic numbers, and it works, what am I missing ? Thank you for your help, and I hope I deviat so much from the OP subject !
regards.
|
Alphae
Blue Republic RvB - BLUE Republic
4
|
Posted - 2014.12.28 12:02:10 -
[2] - Quote
Quote:bah! I wrote a response. Then the forum ate it I'll rewrite in a while. Anyway, the 2048 error is as you're trying to pull too much at once. http://stackoverflow.com/questions/8495687/split-array-into-chunks may work, for splitting it up, into multiple chunks. you want to break up cleanTypeIDs into chunks of, say, 100 entries. The vlookup may be down to a text/number thing. Do you have a parseInt around the typeid in the function?
I don't have the necessary knowledge to use the split array into chunks method, If you could give me a concrete example ? I'll try digging into it.
The Vlookup thing : I tried to change the format of cells into numbers, text, nothing works. I don't have parseInt around the typeid in the function, i don't know what it is, would that help ?
Quote:If you are referencing a sheet with a space in the name then you must wrap the name inside quotation marks (it's either ` ' or " I can't remember exactly but one of those 3). It's best to simply keep all your sheet names without spaces in them so just rename price load to PriceLoad instead.
I renamed the sheet, it's not working either. |