New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

excel-format

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

excel-format

convert excel to any text you want with template

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

Excel Fomart Tool

install

npm install excel-format -g

usage

as node.js module

var excelFormat = require('excel-format');
var output = excel.process('./in.xslx', './out.tpl', {sheetIndex: 0});
console.log(output);

as command line

  Usage: excelformat [options] <excel-file>

  Options:

    -h, --help             output usage information
    -V, --version          output the version number
    -t, --template <file>  template file for formating in mustache and ejs
    -s, --sheet <n>        the sheet index, default 0
    -o, --output <file>    the file to put the formating result

template

simple way: direct use mustache

== the sheet meta ==
{{{sheet.name}}}

== use excel axis ==
{{{1,A}}} {{{2,B}}} !

== use number indexes ==
Yes, {{{3,3}}} {{{4,2}}} {{{5,1}}}

complex way: use ejs to generate mustache template, then use generated template to format

== complex case ==
<% for (var i = 'A'.charCodeAt(0); i <= 'E'.charCodeAt(0); i++) { %>
{{{7,<%= String.fromCharCode(i) %>}}}
<% } %>

Keywords

excel

FAQs

Package last updated on 24 Jul 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts