DailyJS

DailyJS

The JavaScript blog.


Tagspreadsheets
Featured

ui animations spreadsheets excel

ExcelJS, Material Refresh

Posted on .

ExcelJS

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();  
workbook.xlsx.readFile(filename)  
  .then(function() {
    // use workbook
  });

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

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.

Featured

libraries oo spreadsheets excel presentations

Inverted, controldeck.js, xlsx

Posted on .

Inverted

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.

controldeck.js

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

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.

Featured

mobile spreadsheets usability

XLSX.js, Tres, ChromaNope

Posted on .

XLSX.js

XLSX.js (GitHub: stephen-hardy / xlsx.js, License: Microsoft Office Extensible File License) by Stephen Hardy can read and write Excel-compatible XLSX files. It converts base64 strings into object representations of XLSX spreadsheets, without using ActiveX.

It's built using JSZip, and will generate data: URIs with a base64 encoded string that contains the spreadsheet's XML.

Tres

Tres

Tres (GitHub: juliocesar / tres, License: MIT) by Julio Cesar Ody is a mobile framework based on Backbone.js. It provides some convenience classes for working with touch-based gestures and the wide variety of mobile device resolutions, and enough CSS and icons to jump-start development.

Like Backbone.js, Tres has its roots in Rails, so initial versions aim to provide interfaces that work well with Ruby-based projects. This includes console-based tools for generating stub files.

ChromaNope

ChromaNope

ChromaNope by Kris Hedges is a web service designed to illustrate the effects of various forms of colour blindness. It uses Node and PhantomJS to render any web page against the equivalent protanope, deuteranope, and tritanope version. Definitions of these terms can be found on the Wikipedia Color blindness page.