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)
Installation (via$ npm install --save fix-excel-sheet-name
Usage
The package supports ES5 or later. The example below is using ES6 features.
const fixExcelSheetName = const sheetName = 'Is it too long?? Excel/MS Excel sheets have some strange name limitations...' // '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: "<empty>"
- 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.