Skip to content

My first npm module: npm install json-as-xlsx

License

Notifications You must be signed in to change notification settings

radguru/json-as-xlsx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

json-as-xlsx

json-as-xlsx is a tool that helps to build an excel from a json. It depends only on xlsx

Usage

Just import and use it

var xlsx = require('json-as-xlsx')

var columns = [
    { label: 'Email', value: 'email' }, // Top level data
    { label: 'Age', value: row => (row.age + ' years') }, // Run functions
    { label: 'Password', value: row => (row.hidden ? row.hidden.password : '') }, // Deep props
]

var content = [
    { email: 'Luis', age: 19, hidden: { password: '12345678' } },
    { email: 'Ana', age: 16, hidden: { password: '11111111' } }
]

var settings = {
    sheetName: 'First sheet',
    fileName: 'Users'
}

xlsx(columns, content, settings)

About

My first npm module: npm install json-as-xlsx

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%