# react-make-csv

> A template for creating npm packages using TypeScript and VSCode

Latest version **0.0.1** (published 2023-09-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-make-csv
pnpm add react-make-csv
yarn add react-make-csv
bun add react-make-csv
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2023-09-22 |
| First published | 2023-09-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12.0 |
| Dependencies | 0 |
| Unpacked size | 6.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Aqeel Sahi |
| Maintainers | aqeelsahi |
| Keywords | CSV, React, data, table, grid, parsing, file, parser, Excel, spreadsheet, data processing, data conversion, data export, data import |

## Links

- npm: https://www.npmjs.com/package/react-make-csv
- Repository: https://github.com/aqeelsahi/react-make-csv
- Homepage: https://github.com/aqeelsahi/react-make-csv#readme
- Issues: https://github.com/aqeelsahi/react-make-csv/issues
- npm.io page: https://npm.io/package/react-make-csv

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2023-09-22
- 0.0.0 — 2023-09-22
- 1.0.0 — 2023-09-21
- 1.0.12 — 2023-09-21
- 1.0.11 — 2023-09-21
- 1.0.10 — 2023-09-21
- 1.0.9 — 2023-09-19
- 1.0.8 — 2023-09-18
- 1.0.7 — 2023-09-18
- 1.0.6 — 2023-09-18
- 1.0.5 — 2023-09-18
- 1.0.4 — 2023-09-18
- 1.0.3 — 2023-09-18
- 1.0.2 — 2023-09-18
- 1.0.1 — 2023-09-18

## README

# react-make-csv

`react-make-csv` is a JavaScript/TypeScript utility for generating CSV (Comma-Separated Values) files from data arrays. It is designed to simplify the process of creating CSV files for various use cases, such as data export, report generation, and data interchange.

## Installation

You can install `react-make-csv` using npm or yarn:

`npm i react-make-csv`
or
`yarn add react-make-csv`

## Parameters
> data (Array): An array of string arrays representing the data to be converted into CSV format.

> fileName (String): The desired file name for the generated CSV file.


## Example
Here's an example of using react-make-csv to create and trigger a CSV file download:
```tsx
import { generateCSV } from "react-make-csv";
import React from "react";

const Component: React.FC = () => {
    const data: string[][] = [
    ['Name', 'Email', 'Number'],
    ['Alice', 'alice@example.com', '123'],
    ['Bob', 'bob@example.com', '456'],
    ['Charlie', 'charlie@example.com', '789'],
    ['David', 'david@example.com', '101'],
    ['Eva', 'eva@example.com', '202'],
    ['Frank', 'frank@example.com', '303'],
    ['Grace', 'grace@example.com', '404'],
    ['Hank', 'hank@example.com', '505'],
    ['Ivy', 'ivy@example.com', '606'],
    ['Jack', 'jack@example.com', '707'],
  ];

  const downloadCSV = () => generateCSV(data, 'myfile');

  return (
    <div
      style={{ cursor: 'pointer', textDecoration: 'underline' }}
      onClick={downloadCSV}
    >
      Download
    </div>
  );
};

export default Component;
```

## License
This project is licensed under the MIT License - see the LICENSE file for details.

## Contributing
Contributions are welcome! If you have any bug fixes, improvements, or new features to propose, please open an issue or submit a pull request.

## Issues
If you encounter any issues or have questions or suggestions, please feel free to open an issue.

## Acknowledgments
This package was inspired by the need for a simple CSV generation utility.
Special thanks to the open-source community for their valuable contributions.

> Author
> Aqeel Sahi

---
_Source: https://npm.io/package/react-make-csv · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
