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

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

Sanitizes a string to be safe for the use as a sheet name by removing the invalid characters and limiting the length.
https://github.com/seregpie/xlsx.utils.sanitize_sheet_name

Last synced: about 2 months ago
JSON representation

Sanitizes a string to be safe for the use as a sheet name by removing the invalid characters and limiting the length.

Awesome Lists containing this project

README

        

# XLSX.utils.sanitize_sheet_name

`XLSX.utils.sanitize_sheet_name(data)`

Sanitizes a string to be safe for the use as a sheet name by removing the invalid characters and limiting the length.

## setup

### npm

```shell
npm i xlsx.utils.sanitize_sheet_name
```

---

Import inside an ES module.

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

*or*

Import inside a CommonJS module.

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

### browser

```html

```

## usage

```javascript
let sheetName = XLSX.utils.sanitize_sheet_name('Yes/No? [*2]');
// => 'YesNo 2'
```