Format Excel Using C#

Hi Dynamo User Group,

I have a c# app that formats a Excel file and exports a new Excel file to be used by Revit. I’d like to use my c# code in Dynamo. The app has reference package (EPPlus) and several classes which build objects. I noticed that Zero Touch has some limitation but before I get started down this road. I like to see if anyone has a suggestion on how to develop a node using c# in Dynamo.

Do we have other options besides Zero Touch?

Thank you.

Can you elaborate on the Zero Touch “limitation” you noticed?

You can also look at this topic

Konrad,
Reading the documentation on the Wiki it seems that Zero Touch has some differences of how it want to handle code. I can’t just copy and past my classes.

I have object classes which I create “new object”. It seems that Zero Touch can’t create new object. It creates them using static constructors. I’m also using List to make list of objects Example List. It seems that the documentation said it needs to be wrapped. Can it handle reference packages?

I guess my question is what are my options using c# in Dynamo. I’ve been using Visual Studio and have been spoiled with the IDE. I will give Zero Touch a shot and see what it can do.

Thank you for the quick response.

Well you need to keep the two things separate. Zero Touch nodes in one DLL as static classes and then you can just reference in all other custom classes and objects but then just mark them as not to be imported into Dynamo and they won’t show up in the library. It’s not exactly a limitation but more of a functionality.

1 Like

I just got it to work. I just had the “drop the mic moment”. :microphone:

Thank you Konrad.

can you please post a solution and mark your own answer as the solution so we can close the thread? thanks!

Ya. Very easy I just changed the Output type in Visual Studio. Then in Dynamo went to “File - Import Library” and selected the .dll

Check this one…a complete c# excel tutorial

Lynda

1 Like

Thank you. I’ve added it to my list of things to watch on the BART (Subway).

This will help you to…Format Excel file in C#

Lee

bikithalee,
Thank you for the format to excel. I will take a look at the link good BART (subway) reading.

My code had worked correctly it turned out my problem was importing the .dll into Dynamo. My solution was to build it as a class adding all the methods and not including a “main”. I compiled and imported it to Dynamo. Very easy.