An open API service indexing awesome lists of open source software.

https://github.com/seregpie/xlsx.utils.cells_to_sheet

Converts an array of arrays of cell objects to a worksheet.
https://github.com/seregpie/xlsx.utils.cells_to_sheet

Last synced: about 2 months ago
JSON representation

Converts an array of arrays of cell objects to a worksheet.

Awesome Lists containing this project

README

        

# XLSX.utils.cells_to_sheet

`XLSX.utils.cells_to_sheet(data)`

Converts an array of arrays of cell objects to a worksheet.

## setup

### npm

```shell
npm i xlsx.utils.cells_to_sheet
```

---

Import inside an ES module.

```javascript
import 'xlsx.utils.cells_to_sheet';
import XLSX from 'xlsx';
```

*or*

Import inside a CommonJS module.

```javascript
require('xlsx.utils.cells_to_sheet');
let XLSX = require('xlsx');
```

### browser

```html

```

## usage

```javascript
let items = [
['a', 0.543],
['b', 0.164],
['c', 0.774],
];
let ws = XLSX.utils.cells_to_sheet(items.map(([label, value]) => [
{t: 's', v: label},
{t: 'n', v: value, z: '0%'},
]));
```