Package Exports
- xlsx-csv-rust
- xlsx-csv-rust/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (xlsx-csv-rust) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
xlsx-csv-rust
Fast xlsx to csv converter based on Rust package Calamine. It faster than [SheetJs][https://github.com/SheetJS/sheetjs] at least 3 times and eats 5 times smaller memory
Install
npm install xlsx-csv-rust
Usage
import fs from 'fs'
import { convertFile } from 'xlsx-to-csv'
const { filepath } = convertFile('./file.xlsx')
const csvData = fs.readFileSync(filepath, { encoding: 'utf-8' })
console.log(csvData)
Testing
- Install rust
cargo install cargo-watch
npm run test
ornpm run test:integration
(for node integration test)
Building for release
- Install rust
- Install rust target enviornments
rustup target add x86_64-apple-darwin # requires macos machine to build
rustup target add aarch64-apple-darwin # requires macos machine to build
rustup target add x86_64-pc-windows-gnu
rustup target add x86_64-unknown-linux-musl
- (on linux) install build tool required for windows
sudo apt-get install mingw-w64
npm run build
Licence
MIT