Hey everyone,
an originally working Dynamo script for Revit, which reads two Excel lists, suddenly shows an error when reading the same Excel list but in a shortened version:
“List.Contains failed. Object reference not set to an instance of an object.”
I just copied the original excel list and shortened it, so there is less information in it… didn’t change the header or anything else 
Uploading: Excel_Test_V3_Andreas.xlsx…
Excel_Test_V4_Andreas.xlsx (14.3 KB)
What could be the cause of this?
probably there have been an office upgrade and then break it…you could try “online repair tool” but it will probably come again next time its upgrade…try use Data.OpenXMLImportExcel node and see if it could help, but not 100% its the case in your example
I don’t really get what you mean with “online repair tool”… Do you mean a online repair tool for office or for dynamo?
Tried it with the Data.OpenXMLImportExcel node - same error 
But thanks for your suggestion!!
1 Like
I mean office online repair tool, but not sure that the issue then…have you tried restart revit and dynamo ? have just tried your excel sheet and works fine here both with import excel and open.xml
1 Like
restarted dynamo a couple of times already - I will restart Revit again…
yeah try that, and let us know how it goes…
Error still shows up…
I just don’t know what it means since I just shortened the excel file and did nothing else to anything
1 Like
Hmmm and thats the excel file you shared ?
Yes and thats the original version (just longer)
Excel_Test_V3_Andreas.xlsx (22.8 KB)
strange, yeah then i dont know whats wrong
1 Like
Not the answer I was looking for but thanks for your time and that you had a look at it! 
yeah i understand, but i cant provoke that issue…if you havent find a way, i will take a deeper look later …good luck
Dynamo is just doing strange things here, idk…
when i look at your first image it seems import excel works and it first have issues in the codeblock you show there…probably im wrong
ps sometimes it gives this error “List.Contains failed. Object reference not set to an instance of an object.” when we have a conflict with packages or addin, but it doesnt make sense if it works on the other sheet
Those codeblocks just gives you back the indices of the words so it’s nothing to complicated and I didn’t get any errors at that node for now. So I think it should be fine like that 
1 Like
I only have one Add-on installed but beside that, dynamo is completey stock/blank.
It’s going to be really hard to determine the issue if we can’t see your data. What are you feeding the node with the error?
The “object reference not set to an instance of an object” error essentially means that you have at least one input value that isn’t a valid object - likely a null or empty list. Check your inputs for any of these values and clean them up.
You can even see in this image that your output is null. Somewhere you have invalid or null values.
1 Like