Excel > Grasshopper

Sending data from Excel to GH and sometimes can be a bit tricky.

A quick test with a simple sheet looking like this and send in a few different ways:

Sending it in 3 different ways: as range (B3:C5) , with headers (B2:C5) and with headers including the speckle_type (B2:D5). This is the result in GH:

If I’m not mistaken, the old Expand Speckle Object component was able to handle the situation “Excel with headers” so users didn’t need to specifically add the speckle_type column in Excel. But please correct me if I’m wrong :slight_smile:

Would it be possible to enable the DSO component to also be able to handle dictionaries to make handling of data in GH a bit easier? Or would it be wiser to “fix” it on the Excel side and send the data with headers by default as speckle_type Base and when users specify the speckle_type it overwrites the default? Any thoughts?

1 Like

I say both. We may have had a regression on Grasshopper when I added some extra error reporting, as I seem to remember we already supported dictionaries in this particular case.

I would also argue that Excel should be sending fully compliant speckle objects instead of JSON objects that will be converted to dictionaries in C#.


Opened a couple issues for this:

Ok so I had a quick hack at this, and the solution may require a bit more changes that I feel comfortable pushing so close to our 2.10 release,but I’ve got a quick hack:

you can just pass the dictionaries through the Speckle Object parameter to cast them to Base objects :wink: then the DSO would work like a charm.

You can also use it to weave out speckle objects from non-speckle objects :wink:

I’ll have a fix ready to work directly on the DSO node for the next release 2.11

Thank you Alan for looking into it and fixing it for the 2.11 release! Makes sense to approach with caution :slight_smile:

Is the Speckle Object parameter a Speckle GH component because I can’t find it? I tried some other components and with Serialize and Deserialize it works as well.

Oh sorry, should have mentioned this too!

We made that parameter public on this incoming release 2.10 :wink: You can give it a go already by installing it from manager (currently 2.10.0-rc5 i think)