Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

Commented Unassigned: cant use closedXML [9484]

$
0
0
hi, i cant use ClosedXml.

I'm using Visual Studio 2015 4.6 .NET framework
i only created a new Windows Forms Application project with visual studio 2015.
i added reference ClosedXML.dll.
i added only a button with this following code:

using ClosedXML.Excel;

namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
var workbook = new XLWorkbook();
}
}
}


the exception is:

An unhandled exception of type 'System.IO.FileNotFoundException' occurred in System.Windows.Forms.dll

Additional information: Could not load file or assembly 'DocumentFormat.OpenXml, Version=2.5.5631.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

how can i fix the error?

thanks!!!.





Comments: CLosedXML depends on OpenXML, therefore you need this reference as well. The easiest would be to use the ClosedXML Nuget Package.

Viewing all articles
Browse latest Browse all 1877

Trending Articles



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