Documentation Buy Contact Blog
Blog

Number Duck Retrospective: Lessons Learned in Building an Excel Library

Adam C. Clifton
8 May 2025

This is a postmortem of the initial releases of Number Duck, a specialized library for reading and writing Excel spreadsheets. It is written moreso for myself, to focus my thinking and the future plans for the library. The initial releases of Number Duck did OK, it has helped some developers and continues to make some sales, but only enough to keep it shambling along in a zombie state.

I think that's to do with a few critical shortcomings in Number Duck's original design. While the library successfully delivered its core functionality, several architectural decisions created significant barriers to adoption and limited its potential reach. I think I have a good understanding of what the issues are are, and that's been the basis of a lot of behind the scenes work over the years.

Now as I release the first stage of my plan to revamp Number Duck, I can talk about the problems and solutions.

Language limitations

The Problem

Number Duck was initially developed exclusively in C++. While C++ offered performance benefits and low-level control, this single-language implementation severely restricted our potential user base. Most business application developers work primarily in C# or Java, leaving Number Duck inaccessible to the very audience who would benefit most from an Excel integration library.

The Solution

Rather than simply creating language bindings or wrappers (the conventional approach), I took the nuclear option: developing an entirely new programming language specifically designed for cross-language compatibility. This custom language now serves as Number Duck's core implementation layer, with transpilers that generate idiomatic code for multiple target languages.

The initial results have been promising, with functional C++ and C# outputs already available. The transpiled code may not yet be as elegant as hand-written implementations, but this foundation allows Number Duck to reach developers across language ecosystems while maintaining a single source of truth. Future language targets (like Java and TypeScript) can be added by developing additional transpilers rather than reimplementing the entire library.

It's still early days, but i'm happy with this first release, over time I'll definately be able to improve the output to be more readable by end users and to reduce some of the file sizes to speed up compilation.

Binary only release

The Problem

Distributing Number Duck as a compiled C++ library created a maintenance nightmare. Each combination of operating system, compiler version, and compiler settings required a separate binary build. Despite producing numerous binary packages, users still frequently encountered compatibility issues when trying to link Number Duck into their projects. Not forgetting that Number Duck is commercial software tho, having a compiled release does make it easier not to give everything away.

The Solution

Number Duck is now available as an open-source project with a dual-licensing model. The open-source version allows developers to integrate the library's source code directly into their projects, eliminating compatibility issues and simplifying evaluation. For commercial users, a paid license option provides additional support and allows their software to be kept closed source.

I think this has flipped a technical problem into a win. Users can compile Number Duck for whatever platform they need, even those I hadn't anticipated, while the commercial license provides a sustainable revenue model for ongoing development. It will also be easier for users to trial the software and see that it preforms as they need, since they can easily drop it into their project without any complex linking.

Having an open source version freely available will also allow more users of the software who would not have even given the commercial library a second thought. These developers will hopefully have some feedback or bug reports from using the library, which I can take on board to improve Number Duck for everyone.

Focus on the binary xls format

The Problem

Number Duck was built with primary support for the older XLS format. This decision was made to tackle the more complex format first (like my boy Brian Tracy would say, "eat that frog"), expecting that support for the newer XLSX format would follow naturally. However, as XLSX has become increasingly dominant in the industry, primarily supporting the older format has been a hard sacrafice for negative gain.

The Solution

Now that the great language transition is completed with the latest release of Number Duck, i'm now free to pivot development priorities to focus on improving XLSX support, working to bring it to feature parity with the library's XLS capabilities. The plan will then be to primaily support XLSX, while preserving the investment in XLS support as a competitive advantage for users who still need to work with legacy files.

Looking Forward

These three major improvements, language-agnostic implementation, open-source availability, and expanded format support, represent not just technical enhancements but a fundamental rethinking of Number Duck's place in the developer ecosystem.

The journey from a single-language, binary-distributed library to an open, multi-language solution has been challenging, particularly the years spent developing a custom programming language for cross-compilation. However, these investments have positioned Number Duck to serve a dramatically wider audience while maintaining the technical excellence that has always been at its core.

For developers looking to integrate Excel capabilities into their applications, Number Duck now offers not just a library but a flexible solution that can adapt to their specific language preferences, platform requirements, and file format needs.

Previous: JPEG Optimizations