
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
A simple module exports json data to excel, which works in the browser.
It is recommended to run webpack on node 6.x or higher.
Install the pkg with npm:
npm install js2excel --save
or yarn
yarn add js2excel
or bower
bower install js2excel
// es6
import js2excel from 'js2excel';
//CommonJS
let js2excel = require('js2excel');
/**
* excel's data
**/
// excel's header columes
let columns = [
{
// the name will be as the excel colume name
name: 'User Id',
// the prop will be as the excel row data, which is the rows' item's property.
prop: 'userId'
},
{
name: 'Phone Number',
prop: 'userPhoneNumber'
},
{
name: 'User Address',
prop: 'userAddress'
}
];
// excel rows' data
// rows' data will be exports, which you probably get it from server.
let rows = [
{
"userId": 1,
"userPhoneNumber": 1888888888,
"userAddress": 'xxxx'
},
{
"userId": 2,
"userPhoneNumber": 1888888888,
"userAddress": 'xxxx'
},
{
"userId": 3,
"userPhoneNumber": 1888888888,
"userAddress": 'xxxx'
}
];
// this will be export a excel and the file's name is user-info-data.xlsx
// the default file's name is excel.xlsx
try {
js2excel(columns, rows, 'user-info-data');
} catch (e) {
console.error('export error');
}
// for webpack 3: dynamic import
import(/* webpackChunkName: "js2excel" */ 'js2excel').then((js2excel) => {
js2excel(columns, rows, 'user-info-data');
}).catch((e) => {
});
See this: FileSaver#supported-browsers
MIT
FAQs
A simple module for excel and json converts each other
The npm package js2excel receives a total of 809 weekly downloads. As such, js2excel popularity was classified as not popular.
We found that js2excel demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.