forked from p30928647/excelize
Fix corrupted Excel file issue #413
This commit is contained in:
parent
7716968abc
commit
e7581ebf3e
5
sheet.go
5
sheet.go
|
@ -406,6 +406,11 @@ func (f *File) DeleteSheet(name string) {
|
||||||
f.SheetCount--
|
f.SheetCount--
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for idx, bookView := range wb.BookViews.WorkBookView {
|
||||||
|
if bookView.ActiveTab >= f.SheetCount {
|
||||||
|
wb.BookViews.WorkBookView[idx].ActiveTab--
|
||||||
|
}
|
||||||
|
}
|
||||||
f.SetActiveSheet(len(f.GetSheetMap()))
|
f.SetActiveSheet(len(f.GetSheetMap()))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue