18.10.1 • Published 4 years ago

xlsx.utils.cells_to_sheet v18.10.1

Weekly downloads
9
License
MIT
Repository
github
Last release
4 years ago

XLSX.utils.cells_to_sheet

XLSX.utils.cells_to_sheet(data)

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

setup

npm

npm i xlsx.utils.cells_to_sheet

ES module

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

Node

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

browser

<script src="https://unpkg.com/xlsx"></script>
<script src="https://unpkg.com/xlsx.utils.cells_to_sheet"></script>

usage

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

4 years ago

18.10.0

5 years ago

18.9.19

6 years ago

18.6.19

6 years ago

18.3.12

6 years ago

17.9.29-1

7 years ago

17.9.29

7 years ago