I'm new to developing Excel AddIns with C#. I've been doing basic programming in VBA for a few years, but wanted to check out the C# capabilities. And I stumbled over this tutorial and tried it out.
[URL unfurl="true"]https://docs.microsoft.com/en-us/visualstudio/vsto/walkthrough-creating-your-first-vsto-add-in-for-excel?view=vs-2019[/url]
I'm running Windows 10, MS Visual Studio Community 2019 (v. 16.2.2), and Excel for Office 365 MSO (16.0...) 32-bit.
The add-in is SUPPOSED TO create a simple COM AddIn for Excel, so when you save a Workbook, it inserts a new row at the top of the worksheet and adds a line of text / strings to the first cell.
I think I'm following the tutorial instructions correctly, but when I start debugging for the first time, I get the following error:
I hover over that line of code and select, "Show potential fixes","Preview Changes", "Apply". And visual studio adds in this code:
I "Start" the debugger again. Visual Studio opens Excel. I open an excel workbook. Edit the workbook. Save the workbook. Close the workbook. And Visual Studio stops / ends the debugging without any error messages or warning.
Excel seems to be adding an instance of this new COM add-in to the add-ins manager (while I'm still in de-bugger mode), but it is NOT adding a row / text to the worksheet.
I'm at a loss to see what the error is, right now, does anyone see anything that I'm doing work? Or have some hints to point me in the right direction?
Thanks!
[URL unfurl="true"]https://docs.microsoft.com/en-us/visualstudio/vsto/walkthrough-creating-your-first-vsto-add-in-for-excel?view=vs-2019[/url]
I'm running Windows 10, MS Visual Studio Community 2019 (v. 16.2.2), and Excel for Office 365 MSO (16.0...) 32-bit.
The add-in is SUPPOSED TO create a simple COM AddIn for Excel, so when you save a Workbook, it inserts a new row at the top of the worksheet and adds a line of text / strings to the first cell.
I think I'm following the tutorial instructions correctly, but when I start debugging for the first time, I get the following error:
Visual Studio said:Severity Code Description Project File Line Suppression State
Error CS1061 'ThisAddIn' does not contain a definition for 'InternalStartup' and no accessible extension method 'InternalStartup' accepting a first argument of type 'ThisAddIn' could be found (are you missing a using directive or an assembly reference?) FirstExcelAddIn C:\Users\...\source\repos\FirstExcelAddIn\FirstExcelAddIn\ThisAddIn.Designer.cs 58 Active
I hover over that line of code and select, "Show potential fixes","Preview Changes", "Apply". And visual studio adds in this code:
Code:
private void InternalStartup()
{
throw new NotImplementedException();
}
I "Start" the debugger again. Visual Studio opens Excel. I open an excel workbook. Edit the workbook. Save the workbook. Close the workbook. And Visual Studio stops / ends the debugging without any error messages or warning.
Excel seems to be adding an instance of this new COM add-in to the add-ins manager (while I'm still in de-bugger mode), but it is NOT adding a row / text to the worksheet.
I'm at a loss to see what the error is, right now, does anyone see anything that I'm doing work? Or have some hints to point me in the right direction?
Thanks!