cant use closedXML


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()

    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?


file attachments

Closed Nov 11, 2016 at 9:02 AM by igitur
Please create an issue on http://github.com/ClosedXML/ClosedXML if this is still an issue.


Pitterling wrote Mar 24, 2016 at 11:55 AM

CLosedXML depends on OpenXML, therefore you need this reference as well.

The easiest would be to use the ClosedXML Nuget Package.