excel-csv-handler 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/src/README.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# excel-csv-handler
|
|
2
|
+
|
|
3
|
+
A simple Node.js library to read and write Excel **(only for`.xlsx`)** and CSV files, with built-in GBK encoding support for Chinese users.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install excel-csv-handler
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```javascript
|
|
14
|
+
import ExcelCsvHandler from 'excel-csv-handler';
|
|
15
|
+
|
|
16
|
+
const handler = new ExcelCsvHandler();
|
|
17
|
+
await handler.write('output.csv', [{ name: '张三', age: 25 }]);
|
|
18
|
+
const data = await handler.read('output.csv');
|
|
19
|
+
console.log(data);
|
|
20
|
+
```
|
|
Binary file
|