From 50c4dedf8ddb4a7a696a668946bb536c2e8e5623 Mon Sep 17 00:00:00 2001 From: xuri Date: Sun, 16 Jan 2022 14:28:35 +0800 Subject: [PATCH] This closes #1122, improve compatibility with LibreOffice Fixed the issue auto filter doesn't work on LibreOffice if the sheet name has spaces --- table.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/table.go b/table.go index d2ef369c..961f9e6e 100644 --- a/table.go +++ b/table.go @@ -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,