diff options
author | xuri <xuri.me@gmail.com> | 2019-10-23 10:08:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-23 10:08:29 +0800 |
commit | e7581ebf3e14f096b6e2d56ed34d381b4af6d310 (patch) | |
tree | 7b589d3cb887ac72d0d6681286b7478bfdb4ad55 | |
parent | 7716968abc1d330492e311504af8951c34fb7520 (diff) |
Fix corrupted Excel file issue #413
-rw-r--r-- | sheet.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -406,6 +406,11 @@ func (f *File) DeleteSheet(name string) { f.SheetCount-- } } + for idx, bookView := range wb.BookViews.WorkBookView { + if bookView.ActiveTab >= f.SheetCount { + wb.BookViews.WorkBookView[idx].ActiveTab-- + } + } f.SetActiveSheet(len(f.GetSheetMap())) } |