File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -376,7 +376,7 @@ func (f *File) GetSheetName(index int) (name string) {
376376// integer type value -1.
377377func (f * File ) getSheetID (name string ) int {
378378 for sheetID , sheet := range f .GetSheetMap () {
379- if sheet == trimSheetName (name ) {
379+ if strings . EqualFold ( sheet , trimSheetName (name ) ) {
380380 return sheetID
381381 }
382382 }
Original file line number Diff line number Diff line change @@ -465,6 +465,13 @@ func TestDeleteAndAdjustDefinedNames(t *testing.T) {
465465 deleteAndAdjustDefinedNames (& xlsxWorkbook {}, 0 )
466466}
467467
468+ func TestGetSheetID (t * testing.T ) {
469+ file := NewFile ()
470+ file .NewSheet ("Sheet1" )
471+ id := file .getSheetID ("sheet1" )
472+ assert .NotEqual (t , - 1 , id )
473+ }
474+
468475func BenchmarkNewSheet (b * testing.B ) {
469476 b .RunParallel (func (pb * testing.PB ) {
470477 for pb .Next () {
You can’t perform that action at this time.
0 commit comments