Change element workset in excel

I am trying to change the workset of the elements by level, for them I have created a script to get the Revit information and then change it in an excel, but I do not give with the solution to export it from Excel to Revit.

When I give Run this message: Warning: Element.SetParameterByName operation failed.
The parameter’s storage type is not to string

I add an image of the import script of Revit to Excel

If someone could help me I would appreciate it very much

try Workset instead of workset for the parameter name.
second the workset itself has an Id which is the value you have to set

i try to do your solution and I can not get it to work

can you show me the excel file?

here it is

ok first of all
You are handeling Family types in your excel file, not the acutual elements in the model (instances)
To do this use Element.GetParmeterByName instead of Parameter.ParameterByName.
To set the elements in the correct workset, first get the Id of the workset and use that as the value you put in the SetParameterByName node.

1 Like