summaryrefslogtreecommitdiff
path: root/table.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2022-01-16 14:28:35 +0800
committerxuri <xuri.me@gmail.com>2022-01-16 14:28:35 +0800
commit50c4dedf8ddb4a7a696a668946bb536c2e8e5623 (patch)
tree3467c9fed8bd9395302bb98101eaaf1052969340 /table.go
parent236ee61d201e45b1fe33a58b290adb7ee32d3488 (diff)
This closes #1122, improve compatibility with LibreOffice
Fixed the issue auto filter doesn't work on LibreOffice if the sheet name has spaces
Diffstat (limited to 'table.go')
-rw-r--r--table.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/table.go b/table.go
index d2ef369..961f9e6 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,