All Projects → ffalt → xlsx-extract

ffalt / xlsx-extract

Licence: MIT license
nodejs lib for extracting data from XLSX files

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to xlsx-extract

biguint-format
Node.js module to format big uint numbers from a byte array or a Buffer
Stars: ✭ 16 (-51.52%)
Mutual labels:  node-module
easy-excel
🚀 快速读写Excel文件,简单高效
Stars: ✭ 118 (+257.58%)
Mutual labels:  xlsx
xltpl
A python module to generate xls/x files from a xls/x template.
Stars: ✭ 46 (+39.39%)
Mutual labels:  xlsx
xls-cli
A simple cli tool to explore xls files
Stars: ✭ 25 (-24.24%)
Mutual labels:  xlsx
node-cli-boilerplate
🪓 Create node cli with this user friendly boilerplate
Stars: ✭ 17 (-48.48%)
Mutual labels:  node-module
the-traveler
The Traveler is a small npm package which wraps around the Destiny 2 API.
Stars: ✭ 52 (+57.58%)
Mutual labels:  node-module
kodbox
kodbox is a file manager for web. It is a newly designed product based on kodexplorer. It is also a web code editor, which allows you to develop websites directly within the web browser.You can run kodbox either online or locally,on Linux, Windows or Mac based platforms
Stars: ✭ 1,188 (+3500%)
Mutual labels:  xlsx
xlsx-js-style
SheetJS Community Edition + Basic Cell Styles
Stars: ✭ 129 (+290.91%)
Mutual labels:  xlsx
Qxlnt
Use xlnt in Qt 5 or 6. xlnt is cross-platform user-friendly xlsx library for C++14.
Stars: ✭ 66 (+100%)
Mutual labels:  xlsx
node-ts-dedent
TypeScript package which smartly trims and strips indentation from multi-line strings
Stars: ✭ 119 (+260.61%)
Mutual labels:  node-module
lambda-mailer
Simple module for receiving an email from a contact form on your website.
Stars: ✭ 83 (+151.52%)
Mutual labels:  node-module
xlsx-reader
xlsx-reader is a PHP library for fast and efficient reading of XLSX spreadsheet files. Its focus is on reading the data contained within XLSX files, disregarding all document styling beyond that which is strictly necessary for data type recognition. It is built to be usable for very big XLSX files in the magnitude of multiple GBs.
Stars: ✭ 40 (+21.21%)
Mutual labels:  xlsx
originator
🌱 es6 starter - babel, tape, zuul, npm scripts
Stars: ✭ 12 (-63.64%)
Mutual labels:  node-module
xls2db
Export table data from excel to mysql database, implemented with python.
Stars: ✭ 33 (+0%)
Mutual labels:  xlsx
qTsConverter
A simple tool to convert qt translation file (ts) to other format (xlsx / csv) and vice versa
Stars: ✭ 26 (-21.21%)
Mutual labels:  xlsx
terminus-dashboard
Management Dashboard for Terminus DB
Stars: ✭ 16 (-51.52%)
Mutual labels:  node-module
ember-cli-es6-transform
Import ES6 modules from npm, bower or anywhere else in your app.
Stars: ✭ 13 (-60.61%)
Mutual labels:  node-module
xlsx over web
Django开发的excel表格展示系统,将本地xlsx文件导入到数据库,显示到JS页面 online excel manage with django
Stars: ✭ 27 (-18.18%)
Mutual labels:  xlsx
web-scraping-with-python
In this repository i will expalin how to scrap websites using python programming language with BeautifulSoup and requestsmodulues
Stars: ✭ 44 (+33.33%)
Mutual labels:  extracting-data
ioBroker.epson stylus px830
Zustand Druckerpatronen im EPSON Stylus PX830 für ioBroker auslesen
Stars: ✭ 18 (-45.45%)
Mutual labels:  node-module

xlsx-extract

extracts data from XLSX files with low memory footprint

xlsx-files can be pretty big, so nodejs & full featured xlsx-modules can reach memory limits or just use more than is needed for that task. (--max-old-space-size & --stack_size can't help you all the time either)

hence these magnificent features:

  • files are parsed with sax parser sax or node-expat
  • get rows/cells each by callback or write them to a .tsv or .json file

NPM

test license known vulnerabilities certification total downloads

Install

npm install xlsx-extract

The XML files of the format are parsed with sax-js by default.

If you want to use the faster node-expat parser please install it manually and use the {parser:"expat"} option. (Needs native compiling on the destination system)

npm install node-expat

Options


interface IXLSXExtractOptions {
	// sheet selection (provide one of the following)
	sheet_name?: string; // select by sheet name
	sheet_nr?: string; // default "1" - select by number of the sheet starting on 1
	sheet_id?: string; // select by sheet id, e.g. "1"
	sheet_rid?: string; // select by internal sheet rid, e.g. "rId1'
	sheet_all?: boolean; // default false - select all sheets
	// sax parser selection
	parser?: string; // default "sax" - 'sax'|'expat'
	// row selection
	ignore_header?: number; // default 0 - the number of header lines to ignore
	include_empty_rows?: boolean; // default false - include empty rows in the middle/at start
	// how to output sheet, rows and cells
	format?: string; // default array - convert to 'array'||'json'||'tsv'||'obj'
	// tsv output options
	tsv_float_comma?: boolean; // default false - use "," als decimal point for floats
	tsv_delimiter?: string; // default '\t' - use specified character to field delimiter
	tsv_endofline?: string; // default depending on your operating system (node os.EOL) e.g. '\n'
	// cell value formats
	raw_values?: boolean;  // default false - do not apply cell formats (get values as string as in xlsx)
	round_floats?: boolean; // default true - round float values as the cell format defines (values will be reported as parsed floats otherwise)
	date1904?: boolean;   // default false - use date 1904 conversion
	ignore_timezone?: boolean; // default false - ignore timezone in date parsing
	convert_values?: { // apply cell number formats or not (values will be reported as strings otherwise)
		ints?: boolean;  // rounds to int if number format is for int
		floats?: boolean;  // rounds floats according to float number format
		dates?: boolean;  // converts xlsx date to js date
		bools?: boolean; // converts xlsx bool to js boolean
	};
	// xlsx structure options
	workfolder?: string; // default 'xl' - the workbook subfolder in zip structure
}



Convenience API

	var XLSX = require('xlsx-extract').XLSX;

	//dump arrays
	new XLSX().extract('path/to/file.xlsx', {sheet_id:1}) // or sheet_name or sheet_nr
		.on('sheet', function (sheet) {
			console.log('sheet',sheet);  //sheet is array [sheetname, sheetid, sheetnr]
		})
		.on('row', function (row) {
			console.log('row', row);  //row is a array of values or []
		})
		.on('cell', function (cell) {
			console.log('cell', cell); //cell is a value or null
		})
		.on('error', function (err) {
			console.error('error', err);
		})
		.on('end', function (err) {
			console.log('eof');
		});

	//dump by row in tsv-format
	new XLSX().extract('path/to/file.xlsx', {sheet_id:1, format:'tsv'}) // or sheet_name or sheet_nr
		.on('sheet', function (sheet) {
			console.log('sheet', sheet);  //sheet is tsv sheetname sheetnr
		})
		.on('row', function (row) {
			console.log(row); //row is a tsv line
		})
		.on('cell', function (cell) {
			console.log(cell); //cell is a tsv value
		})
		.on('error', function (err) {
			console.error(err);
		})
		.on('end', function (err) {
			console.log('eof');
		});

	//convert to tsv-file (sheet info is not written to file)
	new XLSX().convert('path/to/file.xlsx', 'path/to/destfile.tsv')
		.on('error', function (err) {
			console.error(err);
		})
		.on('end', function () {
			console.log('written');
		})

	//convert to json-file (sheet info is not written to file)
	new XLSX().convert('path/to/file.xlsx', 'path/to/destfile.json')
		.on('error', function (err) {
			console.error(err);
		})
		.on('end', function () {
			console.log('written');
		})

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].