# iot-xlsx-style

> Excel (XLSB/XLSX/XLSM/XLS/XML) and ODS spreadsheet parser and writer (extended to enable read/write of cell formats with xlsx files)

Latest version **0.8.13** (published 2021-08-25) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install iot-xlsx-style
pnpm add iot-xlsx-style
yarn add iot-xlsx-style
bun add iot-xlsx-style
```

Provides the command `xlsx`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.8.13 |
| Published | 2021-08-25 |
| First published | 2021-08-25 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.8 |
| Dependencies | 7 |
| Unpacked size | 4.7 MB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Author | sheetjs |
| Maintainers | hit757 |
| Keywords | excel, xls, xlsx, xlsb, xlsm, ods, office, spreadsheet |

## Links

- npm: https://www.npmjs.com/package/iot-xlsx-style
- Homepage: https://github.com/protobi/js-xlsx/tree/beta#readme
- Issues: https://github.com/protobi/js-xlsx/issues
- npm.io page: https://npm.io/package/iot-xlsx-style

## Dependencies (7)

- [cfb](https://npm.io/package/cfb.md) >=0.10.0
- [ssf](https://npm.io/package/ssf.md) ~0.8.1
- [jszip](https://npm.io/package/jszip.md) 2.4.0
- [crc-32](https://npm.io/package/crc-32.md)
- [adler-32](https://npm.io/package/adler-32.md)
- [codepage](https://npm.io/package/codepage.md) ~1.3.6
- [commander](https://npm.io/package/commander.md)

## Alternatives

- [csv-to-markdown-table](https://npm.io/package/csv-to-markdown-table.md) — 47.0K weekly downloads
- [@sapphire/ratelimits](https://npm.io/package/@sapphire/ratelimits.md) — 4.4K weekly downloads
- [js-csvparser](https://npm.io/package/js-csvparser.md) — 2.0K weekly downloads
- [@adadapted/js-sdk](https://npm.io/package/@adadapted/js-sdk.md) — 251 weekly downloads
- [@grapecity/spread-sheets-sparklines](https://npm.io/package/@grapecity/spread-sheets-sparklines.md) — 103 weekly downloads

## Recent versions

- 0.8.13 (latest) — 2021-08-25

## README

覆盖了xlsx.js中的 write_ws_xml_data 函数，以支持行高设置

```javascript

function write_ws_xml_data(ws, opts, idx, wb) {
	var DEF_PPI = 96, PPI = DEF_PPI;
	function px2pt(px) { return px * 96 / PPI; }
	var o = [], r = [], range = safe_decode_range(ws['!ref']), cell="", ref, rr = "", cols = [], R=0, C=0, rows = ws['!rows'];
	var dense = Array.isArray(ws);
	var params = ({r:rr}), row, height = -1;
	for(C = range.s.c; C <= range.e.c; ++C) cols[C] = encode_col(C);
	for(R = range.s.r; R <= range.e.r; ++R) {
		r = [];
		rr = encode_row(R);
		for(C = range.s.c; C <= range.e.c; ++C) {
			ref = cols[C] + rr;
			var _cell = dense ? (ws[R]||[])[C]: ws[ref];
			if(_cell === undefined) continue;
			if((cell = write_ws_xml_cell(_cell, ref, ws, opts, idx, wb)) != null) r.push(cell);
		}
		if(r.length > 0 || (rows && rows[R])) {
			params = ({r:rr});
			if(rows && rows[R]) {
				row = rows[R];
				if(row.hidden) params.hidden = 1;
				height = -1;
				if(row.hpx) height = px2pt(row.hpx);
				else if(row.hpt) height = row.hpt;
				if(height > -1) { params.ht = height; params.customHeight = 1; }
				if(row.level) { params.outlineLevel = row.level; }
			}
			o[o.length] = (writextag('row', r.join(""), params));
		}
	}
	if(rows) for(; R < rows.length; ++R) {
		if(rows && rows[R]) {
			params = ({r:R+1});
			row = rows[R];
			if(row.hidden) params.hidden = 1;
			height = -1;
			if (row.hpx) height = px2pt(row.hpx);
			else if (row.hpt) height = row.hpt;
			if (height > -1) { params.ht = height; params.customHeight = 1; }
			if (row.level) { params.outlineLevel = row.level; }
			o[o.length] = (writextag('row', "", params));
		}
	}
	return o.join("");
}
```

---
_Source: https://npm.io/package/iot-xlsx-style · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
