Quantcast
Channel: NetOffice - MS Office in .NET
Viewing all articles
Browse latest Browse all 1741

New Post: Cannot use NetOffice with .NET 4.5.1 application

$
0
0
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
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;
        }

Viewing all articles
Browse latest Browse all 1741

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>