Issue with String/ sheet Name

Hello All,

I am having an issue to read sheet name from excel file. These sheets name are system abrriviation for pipe system, when I select pipe in revit and take this parameter and connected to the sheet it shows an error that cannot find that sheet name. How ever when I connected with code block it can find it.
I checked the type of these two string and both are same.

Do you know what should I do to instead of using code block can find sheet name from parameter name of element?

Hi @amirjalaliafshar,

The Data.ImportExcel node is asking for an Excel sheet name to import the data from, are you sure the name is the exact same (upper/ lower case) in your Excel file?

yeah I understand what you are pointing, the sheet name from parameter is exactly “DCWS” and when I use string in code block is working but not from element.getparametervalue byname!! that is weird.

@amirjalaliafshar Look closely at the gap circled in the imaged below


Looks like you have " DCWS" coming in from the GetParameterValueByName node.
Use the String.TrimLeadingWhitespace and let us know how it goes.

2 Likes

Sharp Eye!

1 Like