![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@byetool/json-exporter
Advanced tools
A library that supports exporting json to .xls, .xlsx, .csv, .html, .xml, .json, .txt files in browser
A library that supports exporting json to .xls, .xlsx, .csv, .html, .xml, .json, .txt files in browser.
import exporter from '@byetool/json-exporter'
const data = [
{
id: 1,
title: 'Kinsley High Rise Pop Crop Jeans',
brand: 'AG',
price: '$225.00',
},
{
id: 2,
title: 'Stella Faux Leather Jeans',
brand: 'PAIGE',
price: '$229.00',
},
{
id: 3,
title: 'Rose Jeans',
brand: 'Wandler',
price: '$350.00',
},
]
const filename = 'hello-world'
exporter.toXLSX(data, filename, {
headers: ['title', 'price', 'brand'],
})
7 easy-to-use APIs. Sign as below:
toXLS(data: Obj[], filename: string, options?: Options)
toXLS
- Export json to .xls filetoXLSX
- Export json to .xlsx filetoCSV
- Export json to .csv filetoHTML
- Export json to .html filetoXML
- Export json to .xml filetoJSON
- Export json to .json filetoText
- Export json to .txt fileNOTE: The filename without ext
Here are the available options, except headers, other options come from xlsx
module.
Param | Type | Default | Description |
---|---|---|---|
headers | Header[] | [] | Specify the order and alias of the header, see below |
dateNF | string | 'FMT 14' | Use specified date format in string output |
cellDates | boolean | false | Store dates as type d (default is n ) |
sheetStubs | boolean | false | Create cell objects of type z for null values |
Some usages of headers.
1.Set order only, e.g.
const options = {
headers: ['title', 'price', 'brand'],
}
2.Set alias for header, e.g.
const options = {
headers: [
{ name: 'title', alias: 'Title' },
{ name: 'price', alias: 'Price(USD)' },
{ name: 'brand', alias: 'Brand' },
],
}
3.Choose the fields to output, e.g.
const data = [
{ id: 1, foo: 'hello', bar: 'world' },
{ id: 2, foo: '张三', bar: '李四' },
]
// Output `foo` and `bar` only
const options = {
headers: ['foo', 'bar'],
}
This module is used in Tapicker and works fine.
FAQs
A library that supports exporting json to .xls, .xlsx, .csv, .html, .xml, .json, .txt files in browser
The npm package @byetool/json-exporter receives a total of 1 weekly downloads. As such, @byetool/json-exporter popularity was classified as not popular.
We found that @byetool/json-exporter demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.