0.2.0 • Published 10 years ago
convert-table v0.2.0
Convert Table
convert different json, xls, xlsx, tsv, csv, xml file types to table in nodejs
Install
npm install convert-table
Usage
CvTb = require("convert-table");
CvTb({
input: "sample.xlsx",
table: {
chars: { 'top': '═' , 'top-mid': '╤' , 'top-left': '╔' , 'top-right': '╗'
, 'bottom': '═' , 'bottom-mid': '╧' , 'bottom-left': '╚' , 'bottom-right': '╝'
, 'left': '║' , 'left-mid': '╟' , 'mid': '─' , 'mid-mid': '┼'
, 'right': '║' , 'right-mid': '╢' , 'middle': '│' }
}
}, function(table){
table.show() // call show method to show up the table
});
- Settings
- input(string): could be xls, json, xlsx, tsv, csv, xml
- table(json):
optional
table configure, see detail in https://github.com/LearnBoost/cli-table - callback(function): callback function
Preview
License
MIT @chilijung