none
Closed XML getting error of DocumentFormat.OpenXml Dll.

    Question

  • Hi,

     i have implemented Export to excel functionality in my dot net project. I have used Closed XML api which is based on Open XML ,When i run my code locally for exporting my dataset to excel using Closed XML it works fine.But same project i have deployed on server where my export functionality doesn't work. I have all related DLL in my project. 

     i.e ClosedXML.dll , DocumentFormat.OpenXml

    Error i am getting on server is : 

    System.IO.FileNotFoundExceptionCould 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.

    Please help me to resolve this issue and provide your suggestions.

    Thanks,

    Ketan

    lundi 21 décembre 2015 10:03

Réponses

  • Hi Ketan,

    It seems DocumentFormat.OpenXml is missing. The DocumentFormat.OpenXml.dll is registered in the GAC when the SDK is installed so it does not physically copy it to your project’s folder by default. I suggest you check the DocumentFormat.OpenXml reference, view its properties, and set Copy Local to true, and rebuild your project.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    mardi 22 décembre 2015 03:14
    Modérateur

Toutes les réponses

  • Hi Ketan,

    It seems DocumentFormat.OpenXml is missing. The DocumentFormat.OpenXml.dll is registered in the GAC when the SDK is installed so it does not physically copy it to your project’s folder by default. I suggest you check the DocumentFormat.OpenXml reference, view its properties, and set Copy Local to true, and rebuild your project.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    mardi 22 décembre 2015 03:14
    Modérateur
  • Thanks a lot..It solved my problem...
    mardi 26 juin 2018 05:54