none
Type Mismatch Error when creating a PivotCache with > 65536 rows in range RRS feed

  • Question

  • Hi, I am getting an exception error "Type mismatch. (Exception from HRESULT:0x80020005 (DISP_E_TYPEMISMATCH)) when trying to create a PivotCache on a range that has more than 65536 rows. For ranges smaller than this it works fine.  The line it fails on is:

    Excel.PivotCachepivotCache =Globals.ThisAddIn.Application.ActiveWorkbook.PivotCaches().Add(Excel.XlPivotTableSourceType.xlDatabase, rng);

    This is part of an Application level Addin targeted at Excel 2007 and 2010, so it is using .NET 4 Client Profile and VSTO 2010 runtime.  I am developing in VS2012.

    Any thoughts on why this might be happening or how to get around it?  Thanks.

    Saturday, September 21, 2013 11:10 PM

Answers

All replies

  • Hi, I am getting an exception error "Type mismatch. (Exception from HRESULT:0x80020005 (DISP_E_TYPEMISMATCH)) when trying to create a PivotCache on a range that has more than 65536 rows. For ranges smaller than this it works fine.  The line it fails on is:

    Excel.PivotCachepivotCache = Globals.ThisAddIn.Application.ActiveWorkbook.PivotCaches().Add(Excel.XlPivotTableSourceType.xlDatabase, rng);

    This is part of an Application level Addin targeted at Excel 2007 and 2010, so it is using .NET 4 Client Profile and VSTO 2010 runtime.  I am developing in VS2012.

    Any thoughts on why this might be happening or how to get around it?  Thanks.

    Friday, September 20, 2013 6:05 AM
  • Hi donvreug,


    Thank you for posting in the MSDN Forum.

    I'm trying to involve some senior engineers into this issue and it will take some time.
    Your patience will be greatly appreciated.

    Sorry for any inconvenience and have a nice day!


    Best regards,
    Fei


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, September 23, 2013 8:33 AM
    Moderator
  • Hi donvreug,

    This is a bug and has already been reported to the product group.

    Regards

    Pradip

    Wednesday, October 23, 2013 12:55 PM
  • Hello MSDN.

    Has this bug been corrected yet?

    Kind regards

    Norman Aa. Nielsen / Scanvaegt Systems A/S


    Lars Skov

    Thursday, June 4, 2015 10:06 AM
  • Any Update on the above mentioned bug. I am also getting the same issue.
    Thursday, August 4, 2016 11:57 AM
  • Any Updates!!

    Facing the same problem??

    Tuesday, February 28, 2017 9:54 AM
  • Did you get any workaround for the same?
    Tuesday, February 28, 2017 9:55 AM
  • I had the same issue for excel 2013. Does anyone have any updates on this problem?

    Regards,

    Ken

    Wednesday, November 15, 2017 2:33 AM
  • Does this bug have been resolved yet?? any updates? 

    Best Regards ,

    Kwon 

    Tuesday, June 26, 2018 7:22 AM