Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@coinsummer/react-xls
Advanced tools
react-xls is the fastest in-browser excel ( .xls & .xlsx ) parser for React. It is full of useful features such as useExcelDownloader, ... etc.
react-xls is the fastest in-browser excel ( .xls & .xlsx ) parser for React.
react-xls is available on npm. It can be installed with the following command:
npm install @coinsummer/react-xls --save
react-xls is available on yarn as well. It can be installed with the following command:
yarn add @coinsummer/react-xls --save
import React from 'react';
import { useExcelDownloder } from '@coinsummer/react-xls';
function App() {
const { ExcelDownloder, Type } = useExcelDownloder();
// We will make a Workbook contains 2 Worksheets
const data = {
// Worksheet named animals
animals: [
{ name: 'cat', category: 'animal' },
{ name: 'dog', category: 'animal' },
{ name: 'pig', category: 'animal' },
],
// Worksheet named pokemons
pokemons: [
{ name: 'pikachu', category: 'pokemon' },
{ name: 'Arbok', category: 'pokemon' },
{ name: 'Eevee', category: 'pokemon' },
],
};
return (
<div>
<ExcelDownloder
data={data}
filename={'book'}
type={Type.Button} // or type={'button'}
>
Download
</ExcelDownloder>
</div>
);
}
export default App;
import React from 'react';
import { useExcelDownloder } from '@coinsummer/react-xls';
function App() {
const { ExcelDownloder, Type } = useExcelDownloder();
// We will make a Workbook contains 2 Worksheets
const data = {
// Worksheet named animals
animals: [
{ name: 'cat', category: 'animal' },
{ name: 'dog', category: 'animal' },
{ name: 'pig', category: 'animal' },
],
// Worksheet named pokemons
pokemons: [
{ name: 'pikachu', category: 'pokemon' },
{ name: 'Arbok', category: 'pokemon' },
{ name: 'Eevee', category: 'pokemon' },
],
};
return (
<div>
<ExcelDownloder
data={data}
filename={'book'}
type={Type.Link} // or type={'link'}
>
Download
</ExcelDownloder>
</div>
);
}
export default App;
Object Properties | Description |
---|---|
ExcelDownloder | React component that render the link/button which is clicked to download the data provided in excel file. |
Type | Constant object ( Type.Line && Type.Button ). |
setData | Method that use to set data. |
setFilename | Method that use to set filename. |
setStyle | Method that use to set style. |
setClassName | Method that use to set className. |
Props | Type | Default | Description | Required |
---|---|---|---|---|
children | node | React component, HTML element or string. | ✅ | |
data | object | Downloaded data. | ✅ | |
filename | string | Filename ( .xlsx extension is automatically added ). | ✅ | |
type | string | 'link' | If 'button', render button. | ❌ |
style | object | {} | Inline style. | ❌ |
className | string | '' | className | ❌ |
Latest version 0.1.0 (2021-08-15):
Details changes for each release are documented in the CHANGELOG.md.
If you think any of the react-xls
can be improved, please do open a PR with any updates and submit any issues. Also, I will continue to improve this, so you might want to watch/star this repository to revisit.
We'd love to have your helping hand on contributions to react-xls
by forking and sending a pull request!
Your contributions are heartily ♡ welcome, recognized and appreciated. (✿◠‿◠)
How to contribute:
Bunlong |
FAQs
react-xls is the fastest in-browser excel ( .xls & .xlsx ) parser for React. It is full of useful features such as useExcelDownloader, ... etc.
The npm package @coinsummer/react-xls receives a total of 1 weekly downloads. As such, @coinsummer/react-xls popularity was classified as not popular.
We found that @coinsummer/react-xls 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.