Skip to content
This repository was archived by the owner on Aug 13, 2025. It is now read-only.

Commit 5f428c2

Browse files
authored
Merge pull request #818 from ivantextmagic/issue-817-avoid-auto-filter-bottom-right-cell-abscense
2 parents 7ebd282 + 3138af4 commit 5f428c2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,13 @@ func readSheetFromFile(rsheet xlsxSheet, fi *File, sheetXMLMap map[string]string
735735
sheet.SheetViews = readSheetViews(worksheet.SheetViews)
736736
if worksheet.AutoFilter != nil {
737737
autoFilterBounds := strings.Split(worksheet.AutoFilter.Ref, ":")
738-
sheet.AutoFilter = &AutoFilter{autoFilterBounds[0], autoFilterBounds[1]}
738+
739+
bottomRightCell := autoFilterBounds[0]
740+
if len(autoFilterBounds) > 1 {
741+
bottomRightCell = autoFilterBounds[1]
742+
}
743+
744+
sheet.AutoFilter = &AutoFilter{autoFilterBounds[0], bottomRightCell}
739745
}
740746

741747
sheet.SheetFormat.DefaultColWidth = worksheet.SheetFormatPr.DefaultColWidth

0 commit comments

Comments
 (0)