This closes #1122, improve compatibility with LibreOffice

Fixed the issue auto filter doesn't work on LibreOffice if the sheet name has spaces
This commit is contained in:
xuri 2022-01-16 14:28:35 +08:00
parent 236ee61d20
commit 50c4dedf8d
1 changed files with 1 additions and 1 deletions

View File

@ -300,7 +300,7 @@ func (f *File) AutoFilter(sheet, hCell, vCell, format string) error {
ref, filterDB := cellStart+":"+cellEnd, "_xlnm._FilterDatabase"
wb := f.workbookReader()
sheetID := f.GetSheetIndex(sheet)
filterRange := fmt.Sprintf("%s!%s", sheet, ref)
filterRange := fmt.Sprintf("'%s'!%s", sheet, ref)
d := xlsxDefinedName{
Name: filterDB,
Hidden: true,