Error 0x80042001 when Using VSTO Excel Spreadsheet

62 Views Asked by At

I get this HRESULT 0x80042001 error everytime I try to use VSTO to code for Excel Spreadsheet. It will not load. I've tried several things such as uninstall VS and MSO, used cmd to fix issues, troubleshooter ect.

Anyone have this issue or can help me fix it.

I've tried several things such as uninstall VS and MSO, used cmd to fix issues, troubleshooter ect.

2

There are 2 best solutions below

7
Eugene Astafiev On BEST ANSWER

Besides repairing VS and MS Office, Make sure the Visual Studio Tools for Office Design-Time Adaptor for Excel is an active Add-in in Excel.

Also you may find the VisualStudio Excel VSTO Workbook failed with 0x80042001 thread helpful.

1
Dmitry Streblechenko On

0x80042001 is hrInvalidXML - make sure the XML you return from your addin is valid for the task at hand. Most likely the XML is not malformed, just not what Excel expects.