How to create an instance of Excel if Excel is not installed

后端 未结 4 1470

In my C# app, with the help of Excel Interop dll (as reference) i am reading/writing excel files. If I move this program to system where office/excel is not installed (think

4条回答
  •  清歌不尽
    2020-12-16 11:34

    Even Microsoft does not recommends usein Interop libraries on a server. So best to find some alternative framework to do Excel for you. I have successfully used Npoi in the past for that purpose.

    I know this is not an answer to your exception. But honestly, Interop is a path to an endless trouble and cryptic exception messages.

    Update 2017: I have not used NPOI for a while now and moved all my projects to EPPlus insted - library based on OpenXML that creates you modern xlsx files.

提交回复
热议问题