How NPOI succeeds

Tony Qu
5 min readMay 22, 2023

--

The nuget download of NPOI is reaching 31 million. I do appreciate developers choosing NPOI as their Excel import and export library. Thank you for your trust and confidence on NPOI and the team behind it.

What’s NPOI

NPOI is an open source .NET library which can help you read/write Excel and Word files. It’s the only open source library that supports old Excel (xls files) in .NET. Although old Excel is getting less and less popular, there are still huge legacy systems which needs support for old Excels.

NPOI also supports advanced features of Microsoft Excel such as cell formatting, condtional formats, formula calculation and Excel table. Although NPOI is not Microsoft Excel, it covers 70%-80% features owned by Microsoft Excel. It’s really a friend of .NET developers to ease the interaction with Excel.

This library is a migrated project from Java. The original project is Apache POI, which is the top level project from Apache Foundation. They did a very nice job in Java market.

The Goal of Maintaining NPOI

The goal of maintaining this library is to ease the life of .Net developers and prevent them from using stupid and complex Office PIA interface.

NPOI has been maintained for about 15 years (since 2008). I’m targeting 20 years maintainence. However, I maintain this without any income (even very few donation). My wife always blames me that why I put so much time on this useless (no money) open source project. I always tell her that many developers are using it. I have to maintain this library. But I don’t think she ever got/undestand what I’m saying :D.

However, I have no plan to surpass commercial libraries in some avanced sections. The reason is simple — they hire people. I think it’s good for these company to survive. I don’t think it’s a good idea to implement everything by NPOI so that people can totally replace these commercial products with NPOI. This is not the goal of NPOI.

We are targeting developers/companies who doesn’t have big budget on buying components to read/write Office formats. Usually, this happens for many reasons. Some cases even happens in big/giant companies who are not lack of money. However, most reasons of no budget in these companies are political.

Comparison/Analysis from Commercial Competitors

I really enjoy the analysis from some commercial competitors such as Aspose and Grapecity. I have to admit some points they mentioned are true

However, the consequence of these comparsion pages from competitors is that developers (who are not NPOI users) get to know NPOI and they found it’s totally free even if NPOI doesn’t have some advanced features compared with commercial products. In other words, these commercial competitors are not saling their products with these comparison pages. Instead, they are promoting NPOI.

I did try to contact these direct competitor to see if they are willing to buy advertisement banner from NPOI. But they don’t reply at all.

How NPOI succeeds

Some Chinese developers believe that NPOI succeeds in China mainland first. However, this is totally an illusion.

Although I live in China, this project was promoted globally at the beginning. I remember some foreign technical gurus helped write some articles about NPOI in around 2011 or 2012. I don’t remember the exact time. Since then, it’s just getting popular. However, NPOI doesn’t support the new Office file (xlsx, docx) at that moment. But it didn’t impact NPOI to get popular. Maybe because xls files are too popular at that moment.

Although Microsoft did put a few efforts on creating OpenXML SDK during 2010–2013, it’s not so easy to use. Moreover, it requires developers to own some deep knowledge on OpenXML formats, which is very hard. One thing still needs to mention is that Eric White was the hero behind OpenXML SDK. He is the real architect of this library. However, Microsoft was not willing to give him a FTE position. And finally he left Microsoft in 2011 (according to his Linkedin).

Since Microsoft didn’t do a good job on OpenXML SDK, I started migrating XSSF and XWPF from Apache POI since 2013 and eventually NPOI 2.0.6 was released in Dec, 2014. This was a milestone version of NPOI.

2.x packages are another big success of NPOI. According to the statistics on nuget.org, top download of 2.x packages are

  • 2.4.1 — 6.3 million downloads (most popular package of NPOI ever)
  • 2.5.1 — 4.3 million downloads
  • 2.3.0 — 3.2 million downloads

Contributions from the community is the key success of an open source project. NPOI is receiving more and more PRs from the community since 2020. Although it’s a bit late than expected (it takes 12 years to happen), I really appreciate this.

This also indicates the community trust me and the project and they believe that this project can survive for a long time. This inspires them to contribute because no developer wanna contribute to a project which will die in the coming years. Contributors are willing to see their code to be used in production by companies. This is a kind of honor or archivement they enjoy.

What I learned from NPOI maintainence

Any open source contributor is a lonely warrior at the begining. You have to overcome the lonelyness and persuade yourself that this project can get popular. I have to admit it’s very hard experience.

You need to overcome a lot of factors such as no money, busy work and a lot of overtime because usually you are using your after-work time to do open source projects. You may get complaints from your family or from developers in the community.

Don’t tell yourself that you can get contributors from the community at the first 10 years of maintaining an open source project. It’s a luxury I have to say. You may be lucky enough to get 1–2 extra contributors in the first 5 year. But you have to understand you need to rely on your own in most cases. When you open insights tab of a open source project on Github, it’s easy for you to figure out that the majority of the code of each open source project is from the original developer (founder).

The users of an open source project is NOT always kind enough to encourage you. Some are very evil and they just wanna you to give up or they are willing to see your project is getting destroyed. Don’t be bothered by these guys. They are daemons. If you give up a project because of them, they just make it. What they are not willing to see is that you don’t listen to them at all and continue what you should do on this project.

Open source is NOT a good business model at all. Don’t believe that you can get rich by open source because you see some typical successful cases from the community. It’s very special cases if you dive deep into these cases.

Finally, I have to mention that China mainland is NOT a good place to promote open source projects because it’s hard to survive in the community and there are a few community gangs there always thinking destroying existing open source projects. Although China is the second .NET market according to Microsoft Visual Studio Team, this market is becoming a rat race I’m afraid. And there is no real good online technical community anymore. The existing technical community portals are totally in mess. I don’t use any of these portals at all even if I live in China.

--

--

Tony Qu

.NET Veteran, Buddhist, Maintainer of NPOI, Father and Husband