Notice: Date. ExportExcel operation failed

Goodmorning everyone! Suddenly, a very simple script in Dynamo, which goes to write the word “Hello” in a cell, stopped working and gives me this error:

Notice: Date. ExportExcel operation failed.
Could not cast COM objects of type ‘Microsoft.Office.Interop.Excel.ApplicationClass’ to interface types ‘Microsoft.Office.Interop.Excel._Application’. The operation did not complete because the QueryInterface call on the COM component for the interface with IID ‘{000208D5-0000-0000-C000-000000000046}’ failed due to the following error: Could not find element. (Exception from HRESULT: 0x8002802B (TYPE_E_ELEMENTNOTFOUND)).

I have already searched the forum but did not find any useful information for my problem. I leave you the features of the programs I am trying to use. Thanks a lot to everyone!!

SO: WINDOWS 10 PRO 2004 19041.508
REVIT: 2020.2
DYNAMO CORE: 2.3.0.5885
DYNAMO REVIT: 2.3.0.8352
MICROSOFT 365 APPS FOR BUSINESS: 16.0.13231.20390

Hi,
First thing first, you need to post at least a screen capture to illustrate the issue, and eventually your script. Easier for us to debug/understand the issue.
a picture is worth a thousand words.

Good morning! Thanks for the reply. Being a new user it only makes me attach one image.

errore dynamo2

errore dynamo3

Hey,

Your file path seems relative? If you click into it and choose your location again, does that help? My file path gives a C:\ absolute path…

Cheers,

Mark

1 Like

Hello, nothing changes, it gives me the same mistake. I tried to disconnect and reconnect the various nodes but nothing changes.

or try from the builtin example


that could be because excel is already open, or your file is locked by windows, …
better start fresh

Same mistake! It does not change anything! This is very strange, on another pc with the same software versions the script works! How is it possible? Could the problem be excel?

Maybe this is helpful?

Cheers,

Mark

Edit: (Quote)

If this is not a code related error than please remove below given key from registry.

Steps:

Start–> Run → regedit → HKEY_CLASSES_ROOT–>TypeLib–>{00020813-0000-0000-C000-000000000046} → 1.8/1.7 (Delete this)

Solution: This issue can be resolved by deleting an invalid registry key left over from the higher version of Office. Follow the above steps.

Cause: This issue is caused by a left over registry key if you have downgraded your version of Microsoft Office from either Office 2010 to Office 2007, or Office 2013 to Office 2010 or 2007.

  • also try killing excel process.
  • create a new excel file
  • create a new tab

Sometimes restarting the computer does the trick.

Could it be because the file is on a network and accessed by someone else already?

Nothing at all! it’s incredible!

I don’t have the “1.8/1.7”
image

Hey,

Lower down in that same post, they suggest comparing the registry keys on the problem PC with those on a working PC… Perhaps that will show up something? :slight_smile:

Fingers crossed!

Mark

P.S. You are pretty unlucky to get this difficulty of problem!

I would not start playing in the registry quite yet.
a bit overkill.


export excel.dyn (9.0 KB)

try this one.

I’m waiting for my company’s ICT department to modify Microsoft 365, as described in the topic. I hope that that way we can solve the problem. I honestly don’t know how it could have happened.

Same error!

software related then!
no luck

I’m sorry I did not understand