Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit478e2a0

Browse files
tkm-kjSiemienik
andauthored
Add characters cannot be used for worksheet name (#2126)
Co-authored-by: Siemienik Pawel <hi@siemienik.com>
1 parent202d2e4 commit478e2a0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎lib/doc/workbook.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ class Workbook {
6060

6161
// Illegal character in worksheet name: asterisk (*), question mark (?),
6262
// colon (:), forward slash (/ \), or bracket ([])
63-
if(/[*?:/\\[\]]/.test(name)){
63+
if(/[*?:/\\[\]]/.test(name)){
6464
thrownewError(
65-
`Worksheet name${name} cannot include any of the following characters: * ? : \\ / [ ]`
65+
`Worksheet name${name} cannot include any of the following characters: * ? : \\ / [ ] * ? : ¥ / \ [ ]`
6666
);
6767
}
6868

‎spec/integration/worksheet.spec.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,11 +702,11 @@ describe('Worksheet', () => {
702702
it('throws an error',()=>{
703703
constworkbook=newExcelJS.Workbook();
704704

705-
constinvalidCharacters=['*','?',':','/','\\','[',']'];
705+
constinvalidCharacters=['*','?',':','/','\\','[',']','*','?',':','¥','/','\','[',']'];
706706

707707
for(constinvalidCharacterofinvalidCharacters){
708708
expect(()=>workbook.addWorksheet(invalidCharacter)).to.throw(
709-
`Worksheet name${invalidCharacter} cannot include any of the following characters: * ? : \\ / [ ]`
709+
`Worksheet name${invalidCharacter} cannot include any of the following characters: * ? : \\ / [ ] * ? : ¥ / \ [ ]`
710710
);
711711
}
712712
});

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp