Scott Stewart

Scott Stewart

  • 1.6k
  • 189
  • 18.2k

ExcelWorksheet.Cells[row, col].value2 No Longer Works

Sep 26 2024 5:13 PM

I have a class in my project that accesses Excel worksheets. After upgrading from .Net 4.8 to .Net 8.0, every line using the "value2' or 'value' is an error. The class wont even compile. I made sure to add Microsoft.Office.Interop..Excel to the dependencies. The error is;

CS1061    'object' does not contain a definition for 'Value2' and no accessible extension method 'Value2' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)   

Does anyone know what I can do to fix this?

Thanks,


Answers (1)