# csf-convert

> Convert utilities for Common Spreadsheet Format data

Latest version **1.1.3** (published 2017-06-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install csf-convert
pnpm add csf-convert
yarn add csf-convert
bun add csf-convert
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2017-06-03 |
| First published | 2017-06-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Eugene Nikitin |
| Maintainers | eunikitin |
| Keywords | common-spreadsheet-format, csf, spreadsheet, convert, utils, utilities |

## Links

- npm: https://www.npmjs.com/package/csf-convert
- Repository: https://github.com/eunikitin/csf-convert
- Homepage: http://github.com/eunikitin/csf-convert.git
- Issues: http://github.com/eunikitin/csf-convert/issues
- npm.io page: https://npm.io/package/csf-convert

## Dependencies (1)

- [excel-cell-parser](https://npm.io/package/excel-cell-parser.md) ^1.0.1

## 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

- 1.1.3 (latest) — 2017-06-03
- 1.1.2 — 2017-06-03
- 1.1.1 — 2017-06-03
- 1.1.0 — 2017-06-03
- 1.0.1 — 2017-06-02
- 1.0.0 — 2017-06-02

## README

# Common Spreadsheet Format convert utilities
[![Build Status](https://travis-ci.org/eunikitin/csf-convert.svg?branch=master)](https://travis-ci.org/eunikitin/csf-convert)
[![Coverage Status](https://coveralls.io/repos/github/eunikitin/csf-convert/badge.svg?branch=master)](https://coveralls.io/github/eunikitin/csf-convert?branch=master)
[![dependencies Status](https://david-dm.org/eunikitin/csf-convert/status.svg)](https://david-dm.org/eunikitin/csf-convert)
[![devDependencies Status](https://david-dm.org/eunikitin/csf-convert/dev-status.svg)](https://david-dm.org/eunikitin/csf-convert?type=dev)

## Install
```npm install csf-convert```

## API

### sheetToAoa(data)

#### data

**Required**

Type: object

```js
var convert = require('csf-convert');

var sheetData = {
  A1: { t: 's', v: 'A1' },
  C1: { t: 's', v: 'C1' },
  D1: { t: 's', v: 'D1' },
  E1: { t: 's', v: 'E1' },
  A2: { t: 's', v: 'A2' },
  B2: { t: 's', v: 'B2' },
  C2: { t: 's', v: 'C2' },
  E2: { t: 's', v: 'E2' },
  '!ref': 'A1:E2',
};

var aoa = convert.sheetToAoa(sheetData);
/* result:
[
  [
    { t: 's', v: 'A1' },
    undefined,
    { t: 's', v: 'C1' },
    { t: 's', v: 'D1' },
    { t: 's', v: 'E1' } ],
  [
    { t: 's', v: 'A2' },
    { t: 's', v: 'B2' },
    { t: 's', v: 'C2' },
    undefined,
    { t: 's', v: 'E2' }
  ]
]
 */
```

### aoaToSheet(data)

#### data

**Required**

Type: Array

```js
var convert = require('csf-convert');

var aoa = [
  [
    { t: 's', v: 'A1' },
    undefined,
    { t: 's', v: 'C1' },
    { t: 's', v: 'D1' },
    { t: 's', v: 'E1' } ],
  [
    { t: 's', v: 'A2' },
    { t: 's', v: 'B2' },
    { t: 's', v: 'C2' },
    undefined,
    { t: 's', v: 'E2' }
  ]
]

var sheetData = convert.aoaToSheet(sheetData);
/* result:
{
  A1: { t: 's', v: 'A1' },
  C1: { t: 's', v: 'C1' },
  D1: { t: 's', v: 'D1' },
  E1: { t: 's', v: 'E1' },
  A2: { t: 's', v: 'A2' },
  B2: { t: 's', v: 'B2' },
  C2: { t: 's', v: 'C2' },
  E2: { t: 's', v: 'E2' },
  '!ref': 'A1:E2',
}
 */
```

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