I'm attempting another stab at getting the innermost moons into the spreadsheet, where possible. I've been ignoring the "parents" hierarchy information from EDSM because I didn't think it was very complete, and while that's somewhat true, I think there's enough of it filled in that we can get some interesting results from those that have the data populated. If the planet orbits a barycenter instead of a planet/star directly, it shows its direct parent as "Null" rather than "Planet" or "Star". So for the ones that have that field, I can filter out the barycentric binaries etc.
I wish we could get a record of those barycenter orbits, so that we could accurately include binaries, but there's just no way to do that right now. But at least I can include more moons in the spreadsheet and skip a lot of those with a little more confidence.
I have a test-run going. It's a slow script, so I'll post an update later if it turns out this is working as expected.
EDIT: I'll have to do some debugging / reworking later. It's not doing what I want at the moment. Grrr.