Fork me on GitHub

Excel Builder (.js)

An easy way of building Excel files with javascript

Excel Builder(.js)

Excel Builder (abbreviated as 'EB' for the sake of typing) is a relatively simple way of creating Office 2007 Excel files in Javascript (readable by office 2000/XP/2003 if the support pack has been installed).

Starting work on an updated version with more "modern" api's and nodejs support, but this will take time (and therefor money). So, donations are appreciated, and opening up bounties on issues ( bounties received ) will help a lot. So will the couple of advertisements I put on the site.



Features Supported

Todo (in order of priority)

Why on earth would you build an excel file in Javascript?!?!

Excellent question!

There are a couple of reasons. First, consider that quite often the data one wants in an excel file is the same data that is on the screen. If it's already there, why have the server fetch the same information and then burn through some CPU/IO/RAM time to build an excel file from it, and then serve it back to the user? Seems a bit.. ridiculous doesn't it?

Second, consider that the user may already have all of the transformations they want done to the data on the screen - sorting, columns, colors, etc. This may take a while for the user to do - possibly rendering a caching mechanism useless. Or perhaps timing them out. You already have to collect their preferences in Javascript - why bother creating a way to send the server those preferences, and then work through applying said preferences?

Third, take a look at what an Office Excel file really is. It's a zip file full of XML files. The zip format is a very standardized format with a library that was written by some brainiac for javascript readily available. Javascript eats XML files for breakfast - browsers already have the native ability to work with XML. With the eclipse of IE6 (and IE7 coming shortly), the javascript engines that may show up to grab a copy of that report are becoming increasingly powerful. More and more you should be pushing as much processing as you can onto the client and off of your server.

Heck, if you've been in the development business for more than 5 years, you probably have realized that some of your 'powerful' first webservers are vastly outpaced by today's laptop. I know that my first webserver was slower than my phone is now!

OK - So how do I "download" a file that the browser creates?

Here's the tricky part. There are a couple different ways of doing this, so pick the one that is least painful.

Combining some of these approaches seems like a noteworthy goal.. perhaps a script in the future to do so?


Dual - MIT and GPLv3. Use whatever is appropriate in your project.