-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
confirmedThis issue can be reproducedThis issue can be reproduced
Description
Description
Some valid data validation patterns with non-ASCII characters were rejected by Excelize.
Steps to reproduce the issue:
package main
import (
"strings"
"github.com/360EntSecGroup-Skylar/excelize/v2"
)
func main() {
var cjkStrings = []string{
strings.Repeat("漢", 255),
}
newWorkbookWithDropList(cjkStrings)
}
func newWorkbookWithDropList(choices []string) {
f := excelize.NewFile()
dv := excelize.NewDataValidation(false)
dv.Sqref = "A:A"
if err := dv.SetDropList(choices); err != nil {
panic(err)
}
f.AddDataValidation(f.GetSheetName(0), dv)
f.SaveAs("TestDropList.xlsx")
}Describe the results you received:
panic: data validation must be 0-255 charactersDescribe the results you expected:
Produce a file TestDropList.xlsx, which could be loaded in Microsoft Excel successfully
Output of go version:
go version go1.17rc1 linux/amd64
Excelize version or commit ID:
Environment details (OS, Microsoft Excel™ version, etc.):
The data validation pattern provided above were valid in all the following implementations, but not Excelize:
- Microsoft Office 365 for Mac, 16.49 (21050901)
- Microsoft Office 365 for Windows, 2102 (Build 13801.20808)
- Microsoft Office 2019 Professional Plus for Windows, 2105 (Build 14026.20302)
- Microsoft Office 2013 Professional Plus for Windows, 15.0.4919.1002
Metadata
Metadata
Assignees
Labels
confirmedThis issue can be reproducedThis issue can be reproduced