npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

xlgen

v0.2.3-1

Published

node.js's module to generate Microsoft Excel 97 ~ 2003 File(.xls)

Readme

XLGen

node.js's module to generate Microsoft Excel™ 97 ~ 2003 File(.xls)

Features

  • Excel 97 ~ 2003 File Format(.xls)
  • pure javascript on node.js
  • lightweight javascript module

Changelog

v0.2.3

  • fixed a bug Sometimes, When only string values fill into cells Excel appear it in the incorrect order

v0.2.2

  • fixed issue#2
    Unable to create more than one sheet in a workbook

v0.2.1

  • added support for date - ivantodorovich
    convert javascript date value to excel raw value(number)
  • added support number and date formats
  • modified to overwrite a cell value

v0.1.0

  • first release

API

  • createXLGen( filePath)
    create a XLGen object

XLGen class

  • formatStrings
    standard number format strings

    formatStrings.general: 'General',
    formatStrings.number0: '0',
    formatStrings.number1: '0.00',
    formatStrings.number2: '#,##0',
    formatStrings.number3: '#,##0.00',
    formatStrings.number4: '0%',
    formatStrings.number5: '0.00%',
    formatStrings.number6: '0.00E+00',
    formatStrings.number7: '# ?/?',
    formatStrings.number8: '# ??/??',
    formatStrings.number9: '#,##0 ;(#,##0)',
    formatStrings.number10: '#,##0 ;[Red](#,##0)',
    formatStrings.number11: '#,##0.00;(#,##0.00)',
    formatStrings.number12: '#,##0.00;[Red](#,##0.00)',
    formatStrings.number13: '##0.0E+0',
    formatStrings.date0: 'mm-dd-yy',
    formatStrings.date1: 'd-mmm-yy',
    formatStrings.date2: 'd-mmm',
    formatStrings.date3: 'mmm-yy',
    formatStrings.time0: 'h:mm AM/PM',
    formatStrings.time1: 'h:mm:ss AM/PM',
    formatStrings.time2: 'h:mm',
    formatStrings.time3: 'h:mm:ss',
    formatStrings.time4: 'mm:ss',
    formatStrings.time5: '[h]:mm:ss',
    formatStrings.time6: 'mmss.0',
    formatStrings.dateTime: 'm/d/yy h:mm',
    formatStrings.string: '@'
  • addFormat(formatString)
    use to format a number and date type's value
    formatString : a format string for a number formatting
    return : a Format object

  • addSheet(sheetName)
    sheetName : a sheet name
    return : a Sheet object

  • end(callback)
    flush all into a file and clean up all resources associated with the object.
    after function 'end' has been called, cannot use xlg object again.
    callback(err) : call this after ending a flush

Sheet class

  • cell( rowIndex, colIndex, value, [format])
    input value into cell.
    rowIndex , colIndex: zero-based index
    value : allow a Number, String, Date Type's value
    format : optional, Format object added by addFormat function

Example

var xl = require('xlgen');
var xlg = xl.createXLGen('./test.xls');

//register formats
var fmtDate0 = xlg.addFormat(xl.formatStrings.date0);
var fmtDate1 = xlg.addFormat(xl.formatStrings.date1);
var fmtDate2 = xlg.addFormat(xl.formatStrings.date2);
var custfmtDate = xlg.addFormat('0.0000E+00');

var sht = xlg.addSheet('Sheet1');
//var sht = xlg.addSheet('시트1');

console.log(xl.formatStrings);//print all standard format strings

try{
   sht.cell(0, 1, 1);
   sht.cell(1, 1, 2.1);
   sht.cell(2, 3, 'hi!');
   sht.cell(3, 3, '안녕!');
   sht.cell(5, 4, new Date);
   sht.cell(6, 4, new Date, fmtDate0);
   sht.cell(7, 4, 10000, fmtDate0);
   sht.cell(8, 4, new Date, fmtDate1);
   sht.cell(9, 4, new Date, fmtDate2);
   sht.cell(10, 4, 9999, custfmtDate);
}catch(e){
   console.log(e.name, e.message);
}

xlg.end(function(err){
   if(err) console.log(err.name, err.message);
   else console.log('complete');
});

References

[MS-XLS]: Excel Binary File Format (.xls) Structure

License

MIT