Skip to content

add characters cannot be used for worksheet name #2126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

tkm-kj
Copy link
Contributor

@tkm-kj tkm-kj commented Aug 31, 2022

Summary

As for worksheet name, it raises error if worksheet name contains followings characters now

'*', '?', ':', '/', '\\', '[', ']'

I expect this implementation prevents worksheet from breaking
But, if these characters are full-width characters, the worksheet is broken

Screen.Recording.2022-08-31.at.10.51.50.mov

So, I fixed the issue

Test plan

Code example is below

import ExcelJS from 'exceljs';

const workbook = new ExcelJS.Workbook()
workbook.addWorksheet('?')

If error raises, the test is success

Related to source code (for typings update)

@tkm-kj tkm-kj marked this pull request as ready for review August 31, 2022 01:57
@Siemienik Siemienik self-assigned this Apr 6, 2023
Copy link
Member

@Siemienik Siemienik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you. I think we should check if else characters are incorrect. I suppose there is only a narrow range of allowed characters. Will create an investigation ticket for that. (#2243)

@Siemienik Siemienik merged commit 478e2a0 into exceljs:master Apr 14, 2023
Siemienik added a commit to SiemaTeam/Spreadsheets that referenced this pull request Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants