To read/write from excel spreadsheet using C#

后端 未结 5 1568
礼貌的吻别
礼貌的吻别 2021-01-14 05:47

I need to make a program that writes some data to an excel spreadsheet. Something basic along the lines of First name, last name, phone number, e-mail per row with each cate

5条回答
  •  半阙折子戏
    2021-01-14 06:24

    As cherhan mentioned, Excel automation is the standard, Microsoft approach to programmatically creating spreadsheets. The downsides of this approach is that it used a COM interop layer and therefore requires Excel (and licence) for each server your code is running on.

    I've not managed to find any great open source projects for doing this any better, however, can recommend GemBox's spreadsheet API's as a well-made commercial option (plus they have a basic free version, good for testing it). One major plus to this approach is that it's 100% managed code so makes deployment a bit neater.

    The choice is probably down to if there's a budget you're willing to spend on a library!

提交回复
热议问题