This is possibly the most developer-friendly spreadsheet library ever. Get version 3.3 now!
SpreadsheetLight is also on NuGet. Bug fixed versions will be released promptly via NuGet, but stable releases with source code will still only be available here.
You might also want to check the release notes.
Within your download, you will find:
- The pre-compiled SpreadsheetLight class library DLL
- Class, function and property documentation (in an XML file)
- Source code (in C#) of the SpreadsheetLight library (complete with relevant comments for nasty code sections)
With the documentation (in the XML file), you can also generate MSDN-like documentation for your own use. Or you can use this one.
The C# source code is provided under the MIT License (see within downloadable zip file). Basically it means you’re allowed to use the source code in commercial projects.
Installation and system requirements
You will need to download and install the Open XML SDK 2.0 from Microsoft (it’s freely available). SpreadsheetLight runs on the SDK internally. Then just add SpreadsheetLight to your project just like any other library as a reference.
For convenience, you can download the Open XML SDK DLL 2.0 (DocumentFormat.OpenXml.dll) here too. This is because the SDK 2.5 has incompatibilities (namely the SmartTags tag/class is deprecated). This means if you use the SDK 2.5 version, SpreadsheetLight will complain.
You need at least the .NET Framework 3.5 and above installed on your target machines (either your developer’s machines or more typically, your web server machine).
Compiling the source code? Create your own (Visual Studio?) solution/project and add these references:
- DocumentFormat.OpenXml (from the Open XML SDK)
Then drag and drop everything in the source code folder into your project. Compile. Have tea.
Easy to use
If you know how to use Microsoft Excel, you will know how to use SpreadsheetLight. SpreadsheetLight mimics many of Excel’s user interface and translates them into programming interfaces. This means you don’t have to learn yet another library’s quirks and coding convention and function names. Almost every function will feel familiar (or at least intuitive to use).
And if you hit any problems, just check out the example code to get started.
Light as a feather. Fast as a cheetah.
SpreadsheetLight is designed to consume as little of your memory resources as possible. This means your web server can serve more requests (and probably earn you more money. Huzzah!).
Your spreadsheet with millions of cells can be generated faster than a cheetah can catch an antelope (those cats can run!). This means your users won’t have to wait very long.
Simple and generous licensing
SpreadsheetLight uses the MIT License. Basically, it’s royalty free. You get unlimited developer/site/client/machine licenses. You can use it in a commercial product. You can integrate the included source code in your own projects (subject to the MIT License).
You don’t have to worry about renewing licenses or copyright. Isn’t that a relief?
Not sure if SpreadsheetLight suits your needs? Download the MSDN-style documentation* (right-click and choose the “save as” option if you hit trouble) of all the available classes and functions and enumerations and whatnots. (Did you know the SLDocument class does most of your tasks? This means you don’t need to learn about too many new classes before getting started.)
As you’re writing your code, SpreadsheetLight provides you with extensive documentation on its functions and parameters, so it’s easy for you. The idea is so you don’t have to trawl through tons of documentation if you don’t want to.
* The documentation is in a CHM file. You might have to go to the file properties and choose Unblock under the General tab (in Windows) so you can view it.
I know you’re a busy developer with tons of projects and mounting deadlines. You do not want to figure out how to create spreadsheets or modify existing spreadsheets. It’s a pain in the Adam’s apple, it’s not fun, but you have to do it anyway.
Are you in the spreadsheet business? I’m guessing most probably not.
Your company makes widgets and your clients need that sales report in a spreadsheet. Your marketing director wants to know how much of a budget he can allocate. Your CFO wants to know how much revenue the company made.
You probably like writing code to generate spreadsheets almost as much as you like to actually start up Microsoft Excel and enter some data that upper management wants (timesheets anyone? I’ve been there…).
You don’t want fancy coding constructs. You just want to get that spreadsheet done so you can get on with your life and that your clients can start paying you money.
Thank you for considering SpreadsheetLight and I wish you smooth sailing for your software projects.