Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autofilter doesn't work on LibreOffice if the sheet name has spaces #1122

Closed
harrison3000 opened this issue Jan 15, 2022 · 1 comment
Closed

Comments

@harrison3000
Copy link
Contributor

Description

When using LibreOffice, the autofilter only works if the sheet name doesn't have spaces
It works fine on Google Sheets, I didn't test on MS Office

Steps to reproduce the issue:

  1. Code:
package main

import "github.com/xuri/excelize/v2"

func main() {
	f := excelize.NewFile()

	fill := func(s string) {
		f.SetCellStr(s, "A1", "hi")
		f.SetCellStr(s, "A2", "2")
		f.SetCellStr(s, "A3", "3")

		f.AutoFilter(s, "A1", "A3", "")
	}

	f.SetSheetName("Sheet1", "works")
	fill("works")

	f.NewSheet("Doesnt work")
	fill("Doesnt work")

	f.SaveAs("testoutput.xlsx")
}

Output of go version:

go version go1.17.6 linux/amd64

Excelize version or commit ID:

v2.5.0

Environment details (OS, Microsoft Excel™ version, physical, etc.):
LibreOffice 7.2.5
ArchLinux, up to date

@xuri xuri closed this as completed in 50c4ded Jan 16, 2022
@xuri
Copy link
Member

xuri commented Jan 16, 2022

Thanks for your issue. I have fixed it, please try upgrading to the master branch code, and this patch will be released in the next version.

xuri added a commit to carbin-gun/excelize that referenced this issue Oct 9, 2022
Fixed the issue auto filter doesn't work on LibreOffice if the sheet name has spaces
jenbonzhang pushed a commit to jenbonzhang/excelize that referenced this issue Oct 22, 2023
Fixed the issue auto filter doesn't work on LibreOffice if the sheet name has spaces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Bugfix
Development

No branches or pull requests

2 participants