Releases: LuisEnMarroquin/json-as-xlsx
Released v1.1.7
json-as-xlsx
This is a tool that helps to build an excel from a json and it depends only on xlsx
You can see a live example of how it works on this site: luisenmarroquin.github.io/json-as-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: 'Ana', age: 16, hidden: { password: '11111111' } },
{ email: 'Luis', age: 19, hidden: { password: '12345678' } }
]
var settings = {
sheetName: 'First sheet', // The name of the sheet
fileName: 'Users', // The name of the spreadsheet
extraLength: 3, // A bigger number means that columns should be wider
writeOptions: {} // Style options from https://github.com/SheetJS/sheetjs#writing-options
}
var download = true // If true will download the xlsx file, otherwise will return a buffer
xlsx(columns, content, settings, download) // Will download the excel file
Examples
This are my files used for development, remember to change:
require('./index.js')
and require('../index.js')
to require('json-as-xlsx')
- Frontend with Vue here
- Backend with Express here
Released v1.1.6
json-as-xlsx
This is a tool that helps to build an excel from a json and it depends only on xlsx
You can see a live example of how it works on this site: luisenmarroquin.github.io/json-as-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: 'Ana', age: 16, hidden: { password: '11111111' } },
{ email: 'Luis', age: 19, hidden: { password: '12345678' } }
]
var settings = {
sheetName: 'First sheet', // The name of the sheet
fileName: 'Users', // The name of the spreadsheet
extraLength: 3 // A bigger number means that columns should be wider
}
var download = true // If true will download the xlsx file, otherwise will return a buffer
xlsx(columns, content, settings, download) // Will download the excel file
Examples
This are my files used for development, remember to change:
require('./index.js')
and require('../index.js')
to require('json-as-xlsx')
- Frontend with Vue here
- Backend with Express here
Released v1.1.4
json-as-xlsx
This is a tool that helps to build an excel from a json and it depends only on xlsx
You can see a live example of how it works on this site: luisenmarroquin.github.io/json-as-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: 'Ana', age: 16, hidden: { password: '11111111' } },
{ email: 'Luis', age: 19, hidden: { password: '12345678' } }
]
var settings = {
sheetName: 'First sheet', // The name of the sheet
fileName: 'Users', // The name of the spreadsheet
extraLength: 3 // A bigger number means that columns should be wider
}
var download = true // If true will download the xlsx file, otherwise will return a buffer
xlsx(columns, content, settings, download) // Will download the excel file
Examples
This are my files used for development, remember to change:
require('./index.js')
and require('../index.js')
to require('json-as-xlsx')
- Frontend with Vue here
- Backend with Express here
Released v1.1.3
json-as-xlsx
This is a tool that helps to build an excel from a json and it depends only on xlsx
You can see a live example of how it works on this site: luisenmarroquin.github.io/json-as-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: 'Ana', age: 16, hidden: { password: '11111111' } },
{ email: 'Luis', age: 19, hidden: { password: '12345678' } }
]
var settings = {
sheetName: 'First sheet', // The name of the sheet
fileName: 'Users', // The name of the spreadsheet
extraLength: 3 // A bigger number means that columns should be wider
}
var download = true // If true will download the xlsx file, otherwise will return a buffer
xlsx(columns, content, settings, download) // Will download the excel file
Examples
This are my files used for development, remember to change:
require('./index.js')
and require('../index.js')
for require('json-as-xlsx')
- Frontend with Vue here
- Backend with Express here
Released v1.1.2
json-as-xlsx
This is a tool that helps to build an excel from a json and it depends only on xlsx
You can see a live example of how it works on this site: luisenmarroquin.github.io/json-as-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: 'Ana', age: 16, hidden: { password: '11111111' } },
{ email: 'Luis', age: 19, hidden: { password: '12345678' } }
]
var settings = {
sheetName: 'First sheet', // The name of the sheet
fileName: 'Users', // The name of the spreadsheet
extraLength: 3 // A bigger number means that columns should be wider
}
var download = true // If true will download the xlsx file, otherwise will return a buffer
xlsx(columns, content, settings, download) // Will download the excel file
Examples
This are my files used for development, remember to change:
require('./index.js')
and require('../index.js')
for require('json-as-xlsx')
- Frontend with Vue here
- Backend with Express here
Released v1.1.1
json-as-xlsx
This is a tool that helps to build an excel from a json and it depends only on xlsx
You can see a live example of how it works on this site: luisenmarroquin.github.io/json-as-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: 'Ana', age: 16, hidden: { password: '11111111' } },
{ email: 'Luis', age: 19, hidden: { password: '12345678' } }
]
var settings = {
sheetName: 'First sheet', // The name of the sheet
fileName: 'Users', // The name of the spreadsheet
extraLength: 3 // A bigger number means that columns should be wider
}
var download = true // If true will download the xlsx file, otherwise will return a buffer
xlsx(columns, content, settings, download) // Will download the excel file
Examples
This are my files used for development, remember to change:
const xlsx = require('../index.js')
|| const xlsx = require('../index.js')
=> const xlsx = require('json-as-xlsx')
- Frontend with Vue here
- Backend with Express here
Released v1.1.0
json-as-xlsx
This is a tool that helps to build an excel from a json and it depends only on xlsx
You can see a live example of how it works on this site: luisenmarroquin.github.io/json-as-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: 'Ana', age: 16, hidden: { password: '11111111' } },
{ email: 'Luis', age: 19, hidden: { password: '12345678' } }
]
var settings = {
sheetName: 'First sheet',
fileName: 'Users',
extraLength: 3 // Expands the sizes of the columns
}
var download = true // If true will download the xlsx file, otherwise will return a buffer
xlsx(columns, content, settings, download) // Will download the excel file
Examples
- Frontend with Vue here
- Backend with Express here
Released v1.0.9
json-as-xlsx
This is a tool that helps to build an excel from a json and it depends only on xlsx
You can see a live example of how it works on this site: luisenmarroquin.github.io/json-as-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: 'Ana', age: 16, hidden: { password: '11111111' } },
{ email: 'Luis', age: 19, hidden: { password: '12345678' } }
]
var settings = {
sheetName: 'First sheet',
fileName: 'Users',
extraLength: 3
}
xlsx(columns, content, settings) // Will download the excel file
You can also see it being used with Vue 3 here
Released v1.1.5
json-as-xlsx
This is a tool that helps to build an excel from a json and it depends only on xlsx
You can see a live example of how it works on this site: luisenmarroquin.github.io/json-as-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: 'Ana', age: 16, hidden: { password: '11111111' } },
{ email: 'Luis', age: 19, hidden: { password: '12345678' } }
]
var settings = {
sheetName: 'First sheet', // The name of the sheet
fileName: 'Users', // The name of the spreadsheet
extraLength: 3 // A bigger number means that columns should be wider
}
var download = true // If true will download the xlsx file, otherwise will return a buffer
xlsx(columns, content, settings, download) // Will download the excel file
Examples
This are my files used for development, remember to change:
require('./index.js')
and require('../index.js')
to require('json-as-xlsx')
- Frontend with Vue here
- Backend with Express here