Header of Excel advanced taskpane

Add-in Express™ Support Service
That's what is more important than anything else

Header of Excel advanced taskpane
 
Krzysztof Michalowski


Guest


I try add advanced task pane to my Excel addin. Taskpane doesn't have header, but when I input = in Excel cell header is shown twice. I don't known why header is displayed because alwaysshowheader is set to false and why twice.

Maybe video better explain what I mean
http://youtu.be/RU04HBBVfYk
Posted 19 Mar, 2012 02:18:14 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
Hello,

What Add-in Express version are you using? What Excel 2010 service pack is installed on your PC? And what is Excel 2010 bitness?

Can you send me your project (or any other project reproducing the issue)? Please find the support email address in {Add-in Express installation folder}\readme.txt. And make sure your email contains a link to this topic.


Andrei Smolin
Add-in Express Team Leader
Posted 19 Mar, 2012 02:29:32 Top
Krzysztof Michalowski


Guest


I use Excel 14.0.6112.5000 (32-bit Polish). Add-in Express 7.0.1012 Standard VCL. Windows 7 64-bit pro.

The problem occurs also when I create new addin from scratch. In this case header appear when I input first letter after equal sign.

I sent example project by email.
Posted 19 Mar, 2012 03:11:34 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
Thank you. I've registered your DLL but I cannot reproduce the issue in my Excel. I have the same Excel build installed on Windows 7 64-bit.

Did you try to turn off all other COM add-ins in excel?


Andrei Smolin
Add-in Express Team Leader
Posted 19 Mar, 2012 03:23:40 Top
Krzysztof Michalowski


Guest


I will send you my second project. I tested it on second machine and problem still exist. Second machine is just after reinstall.
Posted 19 Mar, 2012 03:36:30 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
Krzysztof,

The issue isn't reproducible on my side with your second project, too. I've created a project for you to test on your side, see http://www.add-in-express.com/files/support/ExcelPaneTest.zip. Please let me know about your results.


Andrei Smolin
Add-in Express Team Leader
Posted 19 Mar, 2012 03:58:31 Top
Krzysztof Michalowski


Guest


I sent you my observations by email.
Posted 19 Mar, 2012 04:39:13 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
Hi Krzysztof,

The issue occurs because you use the same project as a COM add-in and as an Automation add-in. When you start entering a formula, Excel loads the Automation add-in, its ADXExcelTaskPanesManager creates another instance of your pane, and since the header is automatically shown when a layout contains two or more panes, you see the pane caption shown twice.

I suggest that you create two separate projects: COM add-in and Automation add-in.


Andrei Smolin
Add-in Express Team Leader
Posted 19 Mar, 2012 05:05:54 Top
Krzysztof Michalowski


Guest


Thank you very much for your assistance.
I would like to interact with taskpane from UDF. How do it when I separate project into two addins?

Reagards, Krzysztof Michalowski
Posted 19 Mar, 2012 05:30:45 Top
Andrei Smolin


Add-in Express team


Posts: 18817
Joined: 2006-05-11
You find a COMAddin object representing your add-in in the COMAddins collection of the host application (Excel), retrieve the COM object corresponding to your add-in vi COMAddin.Object and then use late binding to access any public property or method defined in the add-in module.

  if Assigned(IExcel) then
  try
    //
    Guid := GuidToString(CLASS_ADX_MyTest);
    for i := 1 to IExcel.COMAddIns.Count do begin
      V := i;
      if IExcel.COMAddIns.Item(V).Guid = Guid then begin
        IAddIn := IExcel.COMAddIns.Item(V);
        Break;
      end;
    end;

    if Assigned(IAddIn) then
      try
        if IAddIn.Connect then begin
          MyObject := IAddIn.Object_ as IADX_MyTest;
          // access public properties or methods of MyObject
          MyObject := nil;
        end;
      finally
        IAddIn := nil;
      end;
  finally
    IExcel := nil;
  end;


This code fragment is taken from this sample project:
http://www.add-in-express.com/files/projects_pub/add-in-with-external-app.zip

Hope this helps.


Andrei Smolin
Add-in Express Team Leader
Posted 19 Mar, 2012 06:03:19 Top