Skip to content

Commit ceb27e2

Browse files
committed
Update readme
1 parent 09a9288 commit ceb27e2

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,30 @@
11
# FastExcel
22

3+
> This project need Rust to be installed, check here for [Rust installation instruction](https://www.rust-lang.org/tools/install)
4+
35
> This project using [Rust](https://www.rust-lang.org) and [Neon](https://neon-bindings.com) as a binding to Rust to execute fast and efficient memory usage for generating XLSX document from NodeJs.
46
5-
> This project need Rust to be installed, check here for [Rust installation instruction](https://www.rust-lang.org/tools/install)
7+
> This project cannot be executed via NVM based NodeJs, you should deactivate (via `nvm deactivate`) and use a normal version installation of NodeJs.
8+
9+
Writing a large amount of data into Excel file is not a trivial task when you have a limited memory (RAM) allocated. Especially when working at a small node on the server. This library is created to solve that problem, using the efficiency of Rust while generating XLSX from CSV.
610

711
### Installation
812

913
npm i -D cargo-cp-artifact
1014

1115
npm i fastexcel
1216

17+
### How it works
18+
19+
1. Generate the CSV
20+
2. Convert the CSV to XLSX
21+
22+
The CSV generation is happen on the NodeJs side, and converting XLSX file is on Rust side (via Neon)
23+
1324
### Example Usage
1425

15-
```
16-
// index.js
26+
```js
27+
// dummy-excel.js
1728
const path = require('path');
1829
const { CsvFileWriter, Converter } = require("fastexcel");
1930

@@ -25,14 +36,14 @@ const main = async () => {
2536
console.log('dst', dst);
2637

2738
const cols = [];
28-
const totalCols = 200;
39+
const totalCols = 200; // 200 columns
2940
for (let i = 0; i < totalCols; i++) {
3041
cols.push('Col ' + (i+1));
3142
}
3243

3344
const writer = new CsvFileWriter(src, cols);
3445

35-
const totalRows = 1000000; // 1jt rows
46+
const totalRows = 1_000_000; // 1 million rows
3647
for (let i = 0; i < totalRows; i++) {
3748
let row = [];
3849

0 commit comments

Comments
 (0)