Hi,
We have an application which used .NET 3.5 and not we are going to update it to 4.5.1. NetOffice version we have is 1.5.1.2. I just downloaded new version from here and cannot build the application.
Below is error message:
Error 17 Interop type 'NetOffice.ExcelApi.Application' cannot be embedded. Use the applicable interface instead.
This is the line where error points to
We have an application which used .NET 3.5 and not we are going to update it to 4.5.1. NetOffice version we have is 1.5.1.2. I just downloaded new version from here and cannot build the application.
Below is error message:
Error 17 Interop type 'NetOffice.ExcelApi.Application' cannot be embedded. Use the applicable interface instead.
This is the line where error points to
using ExcelApplication = NetOffice.ExcelApi.Application;
and few lines where we use it:version = Application.ProductVersion;
public static ExcelApplication CreateExcelApplication()
{
var application = new ExcelApplication();
application.Visible = false;
application.ScreenUpdating = false; // performance speed-up
application.DisplayAlerts = false;
return application;
}