> For the complete documentation index, see [llms.txt](https://gabin.gitbook.io/react-sheets-import/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gabin.gitbook.io/react-sheets-import/master.md).

# Introduction

## Installation

The package is published as `react-sheets-import` on npm and thus can be installed through:

```bash
# For yarn users:
yarn add react-sheets-import

# For npm users:
npm install react-sheets-import
```

## Basic Example

```javascript
import { Types, mapColumnsToRows } from 'react-sheets-import';

const User = Types.Object({
    name: Types.String(),
    email: Types.String()
});
const rows = [
    ['John', 'john@gmail.com'],
    ['Jane', 'jane@gmail.com']
];
const users = mapColumnsToRows(User, rows);
```

In the above example, `users` evaluates to:

```javascript
[
    {
        "name": "John",
        "email": "john@gmail.com"
    },
    {
        "name": "Jane",
        "email": "jane@gmail.com"
    }
]
```
