Access stored amounts of different types in PI

Hi bright heads

I am trying to learn using the excel addin for tracking stocks of raw materials needed for higher tier factories. For this I want to sum up stored amounts of the materials, using one formula in one cell for each material (calling the specific materials from others cells with the ECUs, and calling the pins of a specific planet).

However, I keep bumping my head against what seems to be a wall, accessing the array within the array that is .contents (wherefrom I want the .amount of selected .type), within the array of .pins (wherefrom I want the storage and launchpads, or failing that just all of them).

Has anybody tried a similar thing?

I have tried using FILTER, INDEX, SUM, SUMIF, but they seem not to work as normal with the Addin “arrays” (as opposed to normal dynamic arrays in excel). Maybe I’m using them wrong. Maybe someone has made it work using a better syntax?

Any help or suggestions is greatly appreciated!

Edit: I can access the materials and amounts just fine if setting up the planets pins manualle in sheets, but I want to make a template that will work for any new planetary setup, hence the need for a universal formula where pins of the planet can be in any order etc.

Filtering pins in PI - EVE Technology and Research Center / EVE x Microsoft Excel Add-in - EVE Online Forums

I am not certain what you are after, but there were some issues a while back involving PI colonies and amounts.

Hi Sarah, thanks for the reply and link, yes I saw it and it is indeed a similar question, but mine relates to calling the contents of any pin dynamically. I’m sorry I’m not very good a explaining myself, but I’ll try an example:

Having a planet with potentially both a launchpad and a storage, which are both in the planet’s .pins, and extracting a material, let’s say microorganisms, for production of T1 (bacteria), I want to be able to sum up the amounts of bacteria stored in all launchpads and storages on the planet, but in principle without knowing beforehand which storages are on the planet. And I preferably would like to do it in a single formula, which would allow me to avoid manually setting up all pins in a planet - I want to make a ‘universal’ template regardless how many pins the planet has, what it’s producing etc.

It is mostly a problem because storages can have several different types stored, so storages become arrays using the .contents, which I must access and evaluate (to find only bacteria). But accessing the storage-contents, within the array of .pins which I also have to evaluate (to find storages and launchpads), is something I can’t wrap my head around.

Using FILTER (as mentioned in your link) comes close, eg. =SUM(FILTER(IFERROR(B13.pins.contents.amount;FALSE);IFERROR(B13.pins.contents.type.name=“Bacteria”;FALSE))), where B13 is my planet and the IFERROR handling the inevitable empty contents, but only the first material of the contents of each pin is read, and storages of course often has more than one material stored.

Even simplifying the problem to accessing any bacteria in a single pin (here C26), like my SUMIF here, =SUMIF($C26.contents.type.name;“Bacteria”;$C26.contents.amount), are unable to compute (excel tells me there’s an error in the formula when I use .contents in this way, but each separate expression computes just fine​:man_shrugging: ). I have removed IFERROR here, but including it doesn’t help.

Well, I don’t know if my examples made any difference?

I have given it all I could (and even what the AI could), but to no avail. For what it may be worth, I’ll try to describe the issue, in case someone later solves it.

I have been unable to return values except the first value dynamically from nested arrays within the .pins (Planetary facilities except from ECUs). By dynamically I mean without first separately spilling the .pins (dynamic arrays) into arrays in cell ranges of their own (which I sought to avoid, as the potentially many needed cells would clutter a template completely).

In the simplest form, I CAN return e.g. the second item of the contents, (which in this case consists of two items) within the .pins.contents of a Launchpad, if first spilling the .pins (Launchpad going to A9 ) like this:

=INDEX(A9).contents,2)

But I CANNOT return the second item of the contents like this (A1 being the planet entity)

=INDEX(INDEX(A1.pins,6).contents,2)

without first spilling or otherwise having the Launchpad in a cell (this could e.g. also be done using =INDEX(A1.pins;6 in A9, not just spilling the .pins array ). All attempts at returning the second or third items from such nested arrays (if that’s what they are) without first having the specific .pin exposed in a separate cell have failed.

I am not even sure if this in a generic excel-problem, or is caused by the way Eve online Addin is made.

Any future suggestions are welcome :slight_smile:

And a final follow up, for other people searching for help regarding similar issues: It turns out this is a known thing of excel, at least still the web version I am working in here.

MS support states:

Nested Array: Excel can’t calculate an array within an array. The nested array error occurs when you try to input an array formula that contains an array. To resolve the error, try removing the second array.

And the excel API reference states that elements of entities nay not directly contain arraycellvalues.

In other words, arrays from data entities like our EO addin needs to be spilled to be able to access nested arrays, instead of working out of in-memory arrays.

It should actually have been fixed in Excel 365 in september 2026 (but I am in the web version instead). There’s hope that this will be rectified in the near future for excel online as well.