DailyJS

ExcelJS, Material Refresh

Alex R. Young

Subscribe

@dailyjs

Facebook

Google+

ui animations spreadsheets excel

ExcelJS, Material Refresh

Posted by Alex R. Young on .
Featured

ui animations spreadsheets excel

ExcelJS, Material Refresh

Posted by Alex R. Young 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.