excel changes to upgrade to net framework 4 RRS feed

  • General discussion

  • I have the following code I use to create an excel spreadsheet in c# code;

    using Excel= Microsoft.Office.Interop.Excel;

    Excel.Application xlApp;
                    Excel.Workbook xlWorkBook;
                    Excel.Worksheet oExcel;
                    Excel.Range formatRange2;

                    object misValue = System.Reflection.Missing.Value;
                    xlApp = new Excel.Application();
                    xlWorkBook = xlApp.Workbooks.Add(misValue);
                    oExcel = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1); <---line that gives error.

    This worked great until I upgraded the project from Net 3.5 to Net 4.0.

    Now I receive the error; "Missing compiler required member Microsoft.CSharp.RuntimeBinder.Binder.Convert" and the program want compile. What do I need to do to get the project to compile?

    Friday, March 1, 2019 4:25 PM

All replies