Is it possible to debug ExcelDNA addin having Excel 2013 and Visual Studio 2010?

1,000 views
Skip to first unread message

Arjun Shetty

unread,
Feb 6, 2014, 6:41:01 AM2/6/14
to exce...@googlegroups.com

Hi Govert,

I am facing an issue with opening and closing the custom task pane in the ExcelDNA Addin(version 0.30 used) in Excel 2013 when more than 2

instances of Excel are opened.
The opening/closing of the customtask pane in one instance of Excel is dependent on the custom task pane in the other opened Excel instance.
This issue does not occur in Excel 2007/2010 but happens only in Excel 2013.

I wanted to debug this issue and hence wanted to debug the Addin with Excel2013.
I have licensed version of Excel 2013 and Visual Studio 2010 on my machine.

Below is the screenshot of the exception i get.

 
 

 
 
 
 
 
 
 
 
 
 
 
 
I read in a post that this may require VS2013 Professional Edition(This installation includes Office tools for Excel 2013).
Do let me know whether it is possible to debug the Addin with Excel 2013 and Visual studio 2010 or whether i need a higher version of Visual Studio
like VS2012/VS2013.
 
 

Regards,
Arjun

Exception in 2013.jpg

Govert van Drimmelen

unread,
Feb 6, 2014, 6:56:05 AM2/6/14
to exce...@googlegroups.com
Hi Arjun,

You can debug your Excel 2013 add-in with Visual Studio 2010, and don't need a higher version.

The exception you see may be related to the Excel 2013 startup sequence, and has probably been fixed in newer check-ins of Excel-DNA, available from CodePlex here: https://exceldna.codeplex.com/SourceControl/latest
If you get that exception with the current Excel-DNA check-in, I'd like to know because it would indicate a bug that remains in Excel-DNA.

Making Custom Task Panes for Excel 2013 is challenging, since every workbook now has its own window, and a Custom Task Pane is associated only with a single window. The CTP sample in the Excel-DNA distribution is not a good example of how to manage task panes under Excel 2013 (your task pane will only ever be associated with one window). I don't know of a reasonable example of working with task panes and Excel 2013 - so any work you do in this regard would be of interest.
I guess there are different approaches:
* show task panes in all the windows, perhaps sharing a common ViewModel behind them
* make a single floating task pane, and switch it as the user switches windows, or
* let the user decide for every window whether a task pane should be displayed or not.

-Govert

Arjun Shetty

unread,
Feb 12, 2014, 7:43:30 AM2/12/14
to exce...@googlegroups.com
Hi Govert,

I downloaded the latest check-in from codeplex and tried to run the Excel Addin with Excel 2015 using VS 2010, but i still get the same exception.
The checkin downloaded is exceldna-80544.zip.
It used the ExcelDNA.xll and the ExcelDna.Integration.dll from the Distribution Folder in  exceldna-80544.zip.

Regards,
Arjun

Govert van Drimmelen

unread,
Feb 12, 2014, 8:12:07 AM2/12/14
to exce...@googlegroups.com
Hi Arjun,

I presume you mean Excel 2013.

That exception in you call to ExcelDnaUtil.Application indicates some issue with Excel-DNA, and I'd like to try to recreate it on my side.
Are you able to make a small add-in that reproduces the Exception in the AutoOpen - maybe even just code in a .dna file?

Do you get the same error when you 
* double-click the .xll file in Explorer to load it in Excel?
* open Excel first, then File->Open the .xll file?
* set the add-in to be loaded automatically by adding it into the Alt+t, i dialog?

Is your Excel configured to show the 'Start screen' when it starts (check at the bottom of File->Options, General).

You can also send me a project via e-mail directly.
Any help you can provide that will let me reproduce the problem would be most appreciated.

Regards,
Govert

Arjun Shetty

unread,
Feb 13, 2014, 6:50:55 AM2/13/14
to exce...@googlegroups.com
Hi Govert,

Yes the Excel version is 2013 not 2015 :)
I have created a sample project and attached it here.

! get the same error when 
* double-click the .xll file in Explorer to load it in Excel
* open Excel first, then File->Open the .xll file
* set the add-in to be loaded automatically by adding it into the Alt+t, i dialog

The Excel 2013 is configured to show the 'Start screen' when it starts (checked at the bottom of File->Options, General).



Do let me know if you are not able to reproduce the issue on Excel 2013  with the sample attached. 

Regards,
Arjun
Excel 2013 issue.jpg
Office 15.jpg
Sample_MyAddIn.zip

Govert van Drimmelen

unread,
Feb 13, 2014, 7:41:15 AM2/13/14
to exce...@googlegroups.com
Hi Arjun,

Thank you for the project.
However, I am _not_ able to reproduce the problem at all.

I've tried the addin as you sent it, in the bin\Debug directory, without recompiling, loaded in different ways. There is no error and I see the "My addin loaded" message as expected
Also, I've recompiled, with the same result.

I'm running the 32-bit version of Excel on a 64-bit Windows 8.1 machine.
* Are you running 64-bit or 32-bit version of Excel?
* Are you able to test on another machine?
* Do you have any other add-ins loaded in the Excel (File->Options, Add-Ins, and then check both "Excel Add-Ins" and "COM Add-Ins")? Can you try without these?
* What anti-virus are you running? Can you try with it paused?
* Does it make a difference if you:
  - First open Excel,
  - Then open a new Workbook
  - Then File->Open your add-in.
 OR
  - First open Excel,
  - Then open a new Workbook
  - Then Alt+F11 to open the VBA IDE, and then switch back to Excel
  - Then File->Open your add-in.

As an unrelated aside, I suggest you remove the VSTO references from your project (the two with with *.Tools.*). These are not useful with Excel-DNA, and can do harm.

A next step would be to try to recompile the current check-in of Excel-DNA on that machine. I've not tried to recompile it with VS 2010, so I'd expect some errors that need to be sorted out.
 
-Govert

Arjun Shetty

unread,
Feb 13, 2014, 8:42:58 AM2/13/14
to exce...@googlegroups.com
Hi Govert,

Thank you for the quick response as always :)

I tried the below steps

First open Excel,
  - Then open a new Workbook
  - Then Alt+F11 

in both Excel 2013 and Excel 2010 . 

In Excel 2010 i see the  VBA IDE but in Excel 2013 nothing comes up.
Looks like this is the root cause.
How do i make the VBA IDE appear in Excel 2013. Do i need to install any tool/update for the Excel 2013?

Regards,
Arjun

Govert van Drimmelen

unread,
Feb 13, 2014, 10:05:56 AM2/13/14
to exce...@googlegroups.com
Hi Arjun,

I think you're right - the VBA IDE not showing indicates you might have a damaged Excel installation. (Since you say the .xll add-in does load.)
Do you perhaps have both Excel 2010 and Excel 2013 installed on the same machine? (That's not a supported configuration.)

Otherwise:
Installing the VBA support is optional, and can be unselected during a custom installation. However, if this were the case, no add-in would ever load in your Excel - so that can't explain the error you report.

I suggest first:
- Check whether the VBA was installed: Go to Add/Remove programs, and for the Office installation, pick "Change" and then "Add or Remove Features". Now check under the "Office Shared Features" option whether "Visual Basic of Applications" is installed. It should be, and probably is.
- Next, do a repair of your Office 2013 installation. Maybe that will work.

Otherwise you might have to uninstall and reinstall from scratch.
Let us know what you find.

Regards,
Govert

Arjun Shetty

unread,
Feb 18, 2014, 7:22:58 AM2/18/14
to exce...@googlegroups.com
Hi Govert,
I do have both Excel 2010 and Excel 2013 installed on the same machine?
In this case, to debug with Excel 2013 and Visual studio 2010 do i have to uninstall both Excel 2010 and Excel 2013 and then re-install 2013 so that the  VBA IDE shows up in Excel 2013?

Regards,
Arjun

Govert van Drimmelen

unread,
Feb 18, 2014, 5:32:31 PM2/18/14
to exce...@googlegroups.com
Hi Arjun,

Here is some information from Microsoft on running multiple versions of Office on a computer: http://support.microsoft.com/kb/2784668
They say it is not recommended, but it looks like it might work if you install the Office versions in the right order, so first install Excel 2010, then 2013.

It's not something I have experience with, but I think a problematic Office installation explains your Excel-DNA issues.

Regards,
Govert

Jiri Pik

unread,
Feb 19, 2014, 12:09:46 AM2/19/14
to exce...@googlegroups.com

How about this - you can create a virtual machine with the other office and then debug remotely?

--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To post to this group, send email to exce...@googlegroups.com.
Visit this group at http://groups.google.com/group/exceldna.
For more options, visit https://groups.google.com/groups/opt_out.

Patrick O'Beirne

unread,
Feb 19, 2014, 5:20:27 AM2/19/14
to exce...@googlegroups.com
I used ExcelDna on a PC with four versions of Excel - 2003, 2007, 2010, 2013. Installed in that order, as MS say,
Each works fine. But repairing an installation makes it the default association for the .xl* file types. So uninstall and reinstall in order might be best.
Jiri's idea is interesting - you mean instead of a complete Excel +VS+ExcelDNA on the VPC, just install Excel and connect to it remotely somehow to debug it?




On 19/02/2014 05:09, Jiri Pik wrote:

Jiri Pik

unread,
Feb 19, 2014, 5:23:42 AM2/19/14
to exce...@googlegroups.com

As MS says, Windows 8.0 can run on a computer with 1 or so GB memory…..

 

Check out this http://msdn.microsoft.com/query/dev12.query?appId=Dev12IDEF1&l=EN-US&k=k(vs.debug.remote.overview)&rd=true

--

Reply all
Reply to author
Forward
0 new messages