# fix-excel-sheet-name

> This package fixes MS-Excel sheet name by limiting it to 31 characters, empty sheet name, and removing illegal characters such as :\/?*[] and more.

Latest version **2.0.0** (published 2016-08-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install fix-excel-sheet-name
pnpm add fix-excel-sheet-name
yarn add fix-excel-sheet-name
bun add fix-excel-sheet-name
```

## 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 | 2.0.0 |
| Published | 2016-08-31 |
| First published | 2016-08-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Oron Nadiv |
| Maintainers | oronnadiv |
| Keywords | fix, excel, ms-excel, office, ms-office, sheet, name, xls, xlsx |

## Links

- npm: https://www.npmjs.com/package/fix-excel-sheet-name
- Repository: https://github.com/OronNadiv/fix-excel-sheet-name
- Homepage: https://github.com/OronNadiv/fix-excel-sheet-name#readme
- Issues: https://github.com/OronNadiv/fix-excel-sheet-name/issues
- npm.io page: https://npm.io/package/fix-excel-sheet-name

## Dependencies (1)

- [lodash](https://npm.io/package/lodash.md) ^4.15.0

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 2.0.0 (latest) — 2016-08-31
- 1.0.1 — 2016-08-31
- 1.0.0 — 2016-08-31

## README

# Fix Excel Sheet Name
This package fixes MS-Excel sheet name by limiting it to 31 characters, empty sheet name, and removing illegal characters such as :\\/?*[] and more.
    
[![NPM version][npm-image]][npm-url]
[![Build Status][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]
[![Dependencies][dependencies-image]][dependencies-url]
[![DevDependencies][dependencies-dev-image]][dependencies-dev-url]
[![JavaScript Style Guide][standard-image]][standard-url]

## Installation (via [npm](https://www.npmjs.com/package/fix-excel-sheet-name))

```bash
$ npm install --save fix-excel-sheet-name
```

## Usage

The package supports ES5 or later.  The example below is using ES6 features.  

```javascript
const fixExcelSheetName = require('fix-excel-sheet-name')

const sheetName = 'Is it too long?? Excel/MS Excel sheets have some strange name limitations...'
fixExcelSheetName(sheetName, {
  empty: 'missing sheet name',
  omission: ' - END',
  replacement: '_'
}) // 'Is it too long__ Excel_MS - END'
```

* __sheetName__ (required) - the excel sheet name you want to fix.
* __empty__ (optional) - sheet name in case given name is missing (empty string).  Default empty sheet name: "&lt;empty&gt;"
* __omission__ (optional) - MS Excel sheet names are limited to 31 characters.  The last characters of the truncated sheet name are replaced with the omission string which defaults to “…”.
* __replacement__ (optional) - MS Excel sheet names cannot include some characters such as !*: and more.  The given parameter will be used to replace those illegal characters.

### License
[MIT](https://spdx.org/licenses/MIT.html)

### Author
[Oron Nadiv](https://github.com/OronNadiv) ([oron@nadiv.us](mailto:oron@nadiv.us))

[dependencies-image]: https://david-dm.org/OronNadiv/fix-excel-sheet-name/status.svg
[dependencies-url]: https://david-dm.org/OronNadiv/fix-excel-sheet-name
[dependencies-dev-image]: https://david-dm.org/OronNadiv/fix-excel-sheet-name/dev-status.svg
[dependencies-dev-url]: https://david-dm.org/OronNadiv/fix-excel-sheet-name?type=dev
[travis-image]: http://img.shields.io/travis/OronNadiv/fix-excel-sheet-name.svg?style=flat-square
[travis-url]: https://travis-ci.org/OronNadiv/fix-excel-sheet-name
[coveralls-image]: http://img.shields.io/coveralls/OronNadiv/fix-excel-sheet-name.svg?style=flat-square
[coveralls-url]: https://coveralls.io/r/OronNadiv/fix-excel-sheet-name
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg
[standard-url]: http://standardjs.com
[npm-image]: https://badge.fury.io/js/fix-excel-sheet-name.svg
[npm-url]: http://badge.fury.io/js/fix-excel-sheet-name

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