Importing data from Excel to Revit panel schedules

I have four panels A, B, C, and D and I am trying to import data from Excel to Revit panel schedules. I tried using Element.SetParameterByName but the issue is that when reading Excel I don’t know how to assign relative information for each circuit to the ones in Revit. My goal is to be able to make changes to circuit names in Excel and export it to Revit. Is there anyone who can help me with this? Please let me know if more information is required.

Hey, can you provide this Sample revit file along with Dynamo script, for better understanding of the problem.

I am not able to upload my Revit file due to file size restrictions. I am attaching the Dynamo and Excel files here tho.
SAMPLE-ReadFromExcel.dyn (57.1 KB)
Sample-Excel.xlsx (211.1 KB)

The question you should be asking yourself is: How do I know which circuit is which? I’m guessing your excel data includes something like Panel and Circuit Number. That’s the same data you should use in Revit to map to the same element. A dictionary is usually the best solution here, but you can also filter with a boolean mask or something similar. Check out similar posts in the forum for examples.

Thank you Nick. Yes, I fully know and understand the question here. I just don’t know the answer. Thanks for the tips. I will do some research on them.

A dictionary is your best bet. You would create the dictionary from your excel data - your circuit (Panel + Ckt No) would be your key and it would return the values you’re looking for. Then you just need to get the circuits from your Revit project and get their circuit value (Panel + Ckt No) and use that to return the values from your dictionary.

Thank you Nick. Finally I could do this by creating a dictionary.