This project has moved and is read-only. For the latest updates, please go here.
1

Closed

cant use closedXML

description

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!!!.

file attachments

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

comments

Pitterling wrote Mar 24, 2016 at 12:55 PM

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

The easiest would be to use the ClosedXML Nuget Package.