

I'm working on a graph that will read an Excel file and create Family Types.
I've got everything working (I'll share if you want it) but the problem I'm having is every time we get a spreadsheet from a new client, everything is in different columns.
So what I'd like to be able to do is either read the column headers and have Dynamo figure out what that column is, or maybe have a second Tab in the spreadsheet that would call out
Column F Width
Column G Depth
Column H Height
Column Q Type Name
And then somehow have Dynamo translate that into which column to use to pass that parameter
But I can't think of a good way to do that without a thousand wires flying all over.
Maybe somehow create a dictionary?
Couldnt you just provide the client with a template excel file?
What you want would negate some of the human error though, and im sure its possible but its a bit beyond my dynamo skills atm![]()
Suppose that the names of the columns are different each time, then manually opening the spreadsheet and determining the required columns cannot be avoided. I would add 4 input number nodes to the script to override the column indices retrieved from the Excel file, if required.
Assuming at least the names are something you know this should work:
Might want to make a little interface where people can enter the Column names if they differ. I would not play with the order there, knowing which property is in which position after you rejigged it will let you do all the other things you want.
If the names of the columns are something you can rely on, you can just use this to fire&forget in all cases.
I used this last year without any trouble at all while dealing with a customer whose data-archive was such a mess I'm reluctant to call it an archive.
I'd love to give the client a template to start from, but most of what we get are from their facilities group and they've been using the spreadsheet the way they want it for years. Far be it for us to make them change.
Here's what I ended up doing.
As I feared, there are a lot of wires, but at least this will make it easy to tweak the graph for each variety
![]()