Related to linking Excel data in Dynamo

I frequently use Dynamo (Revit and Civil3D) in my work. There are two issues that I often encounter, but I am not sure about the causes.

  1. After finishing my work, even though I have closed all applications such as Revit and Excel, and I have also checked the Task Manager to make sure that Excel is completely closed, when I shut down the PC it still shows that Excel is running. I then have to force the PC to shut down.
    Earlier during the work process, I used Dynamo to read data from Excel.
  2. While using Dynamo, I use Excel data reading nodes such as Data.OpenXMLImportExcel. Although the program runs normally and there are no errors, when I open the same program later and run it again, an error occurs at the Excel reading node. However, if I simply recreate an identical node and reconnect the inputs and outputs, the program runs normally again.

Sorry for not attaching any screenshots, but if you have any experience or insight regarding these two issues that I frequently encounter, I would greatly appreciate the opportunity to learn from you.

Just wanted to add to this and state that I have encountered this issue before in both Dynamo and C#.

Its easy for me to identify the issue in C# which is generally if I hit errors durint opening or reading, or am unable to close the file successfully - leaving it in an opened/marshalled state.

If it’s not a supressed error/issue in the dyn node (i would expect it to throw the error at least and attempt disposal/closure of the file), then id test running similar tasks with internet off and excel macros disabled if you have any, as in my xp onedrive/sharepoint/macros can often interrupt processing excel files and stop intended closure.

1 Like

My recollection is that that the number of possible exceptions when using Excel’s COM API is too significant to cover elegantly without making a career out of it. The entirety of the excel interop effort is async and there is no certainty that the application is even installed. Given a choice between a developer spending half a year covering those and all the other things that the team has built, we’ve made the right choice.

That said the OpenXML based nodes shouldn’t have this problem at all, so best to ‘skip’ it. Which leads me to @Minami’s second point:

This is almost certainly an issue with a dependency conflict in the openxml library which is used for file access - see if you have any warnings in your Dynamo log or Revit journal and address those. :slight_smile:

2 Likes

Hi Jacob.small and GavinNicholls

I sincerely apologize for not being able to reply to your comments sooner.

Thank you for taking the time to respond to my questions.

I believe I understand now and will keep this in mind when using Dynamo in the future.

Thank you very much.

2 Likes