The users here have Excel 2007. I want to create an add-in to react to a PivotTable being changed. In Visual Studio 2013, I created an Excel Add-in via New project > Installed > Templates > Visual C# > Office/SharePoint > Office Add-ins > Excel 2010 Add-in
To be a little more specific about my situation, I need to massage a pivot table after the user filters it in the .xlsx file (Excel 2007). I think the only way I can do this is via a VSTO add-in. I've got this:
namespace ExcelAddInForRptRunner
{
public partial class ThisAddIn
{
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
Excel.Worksheet sh = this.Application.ActiveSheet;
sh.PivotTableUpdate += new Excel.DocEvents_PivotTableUpdateEventHandler(sh_PivotTableUpdate);
}
void sh_PivotTableUpdate(Excel.PivotTable TargetPivotTable)
{
MessageBox.Show("sh_PivotTableUpdate event fired");
}
}
}
When I right-click the project and select Debug > Start New Instance, I get "You cannot debug or run this project, because the required version of the Microsoft Office application is not installed." and "Unable to start debugging"
It's true that I don't have Excel 2010 installed, but I had hoped that the "Excel 2010 Add-in" project would also work for Excel 2007.
Is this err msg I'm seeing because the .DLL needs to be deployed somehow/way, or is it really because Excel 2010 is not installed, or what?