Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@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 react-xls --save
react-xls is available on yarn as well. It can be installed with the following command:
yarn add react-xls --save
import React from 'react';
import { useExcelDownloder } from '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 '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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.