The JavaScript blog.


ui animations spreadsheets excel

ExcelJS, Material Refresh

Posted on .


ExcelJS (GitHub: guyonroche/exceljs, License: MIT, npm: exceljs) by Guyon Roche is a module for converting Excel spreadsheets to styles and JSON. It was created by reverse engineering Excel files into pure JavaScript, so if you look at the source it's surprisingly readable. Everything is split up into modules, and simple classes are used to model the main entities in Excel documents.

For example, the cell.js file defines a Cell object that has methods for addressing the cell and manipulating styles. This is then used to build data types like StringValue and DateValue.

It can read and write Excel, and it handles functions, links, fonts, borders, alignments, and fills. Here's the author's example of reading an Excel file:

var workbook = new Excel.Workbook();  
  .then(function() {
    // use workbook

// pipe from stream
var workbook = new Excel.Workbook();  

If you're interested in Excel, then also check out js-xls and SheetJS.

Material Refresh

Material Refresh (GitHub: lightningtgc/material-refresh, License: MIT, npm: material-refresh) by gctang is a Material Design pull/swipe to refresh library. It has several modes of display: above surface, below surface, and button.

I tried it out on a mobile device and the animations seemed very smooth. To use the library, set it up by calling mRefresh and then mRefresh.resolve() to hide the spinner.


libraries oo spreadsheets excel presentations

Inverted, controldeck.js, xlsx

Posted on .


Inverted (GitHub: philmander / inverted, License: MIT, npm: inverted) by Phil Mander is an inversion of control container. Used in conjunction with AMD, Inverted uses a separate configuration file to express how classes are instantiated and how they interact. Once these defaults and relationships have been defined, an application context can be created, and instances of the classes can be used.

Phil has provided several examples on the Inverted site that use AMD, but he's also included a CommonJS example that could be used with Node. The API is mostly based around callbacks. For example, fetching an instance is performed with appContext.getProto('name', fn), where fn receives the instance as the first argument.

JavaScript module loading systems such as the CommonJS and AMD manage the loading of your application's dependencies, but they don't actually inject dependencies and wire your code together. Inverted uses a separate application configuration file to define how your Javascript 'classes' interact without needing to add any library specific code within your modules.


One of the controldeck.js demos.

controldeck.js (GitHub: dfcb / controldeck.js, License: MIT) from Draftfcb in Chicago is a small Node web application that provides a remote control for HTML presentations. This offers a simple way of using a mobile phone to control a slideshow.

Socket.IO is used to communicate between the controller and the slides, and the authors have demos running on AppFog.


xlsx (GitHub: Niggler / js-xlsx, License: MIT, npm: xlsx) by Niggler is an implementation of the ISO 29500 Office Open XML specification. The author states that it has been tested with some simple Excel 2011 files, but is still a nascent attempt at supporting the format.

It's designed to work with Node and browsers, and the project's homepage has a browser-based demo. This project was created in response to Stephen Hardy's xlsx.js project -- there was a lengthy discussion on the license of the project which some felt is ambiguous: stephen-hardy / xlsx.js, issue #8: Use a more permissive license.