Skip to content

Commit

Permalink
Merge pull request #818 from ivantextmagic/issue-817-avoid-auto-filte…
Browse files Browse the repository at this point in the history
…r-bottom-right-cell-abscense
  • Loading branch information
tealeg authored Sep 17, 2024
2 parents 7ebd282 + 3138af4 commit 5f428c2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,13 @@ func readSheetFromFile(rsheet xlsxSheet, fi *File, sheetXMLMap map[string]string
sheet.SheetViews = readSheetViews(worksheet.SheetViews)
if worksheet.AutoFilter != nil {
autoFilterBounds := strings.Split(worksheet.AutoFilter.Ref, ":")
sheet.AutoFilter = &AutoFilter{autoFilterBounds[0], autoFilterBounds[1]}

bottomRightCell := autoFilterBounds[0]
if len(autoFilterBounds) > 1 {
bottomRightCell = autoFilterBounds[1]
}

sheet.AutoFilter = &AutoFilter{autoFilterBounds[0], bottomRightCell}
}

sheet.SheetFormat.DefaultColWidth = worksheet.SheetFormatPr.DefaultColWidth
Expand Down

0 comments on commit 5f428c2

Please sign in to comment.