Skip to content

Sominemo/tiny-xlsx-reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiny xlsx reader

A small library to read xlsx and csv files.

Depends on its sister project, tiny-unzip.

Usage

XLSX:

const reader = new XlsxWorkbookReader(fileBuffer); const sheet = await reader.getSheet(0); // readAllRows(trimTable = true, ignoreRogueSpaces, addType) const rows = await sheet.readAllRows(true); return rows;

CSV:

const decoder = new TextDecoder("utf-8"); const text = decoder.decode(fileBuffer); // constructor(file, separator = ",") const reader = new CsvReader(text); // splits by new line reader.read(); const rows = reader.readAllRows(true); return rows;

About

A small library to read xlsx and csv files.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors