Skip to content

AutoFilter does not work on OpenOffice  #776

@pandaadb

Description

@pandaadb

Description

Creating a simple autoFilter will not be displayed on OpenOffice, it is however displayed on Office365.

Steps to reproduce the issue:

Code:

        f := excelize.NewFile()

	f.NewSheet("sheet_test")
	for i := 0; i < 5; i++ {
		idx, _ := excelize.CoordinatesToCellName(i+1, 1)
		f.SetCellValue("sheet_test", idx, fmt.Sprintf("Header %d", i))
	}

	row := 2

	for j := 0; j < 10; j++ {

		for i := 0; i < 5; i++ {
			idx, _ := excelize.CoordinatesToCellName(i+1, row)
			f.SetCellValue("sheet_test", idx, fmt.Sprintf("Value %d", i))
		}

		row++
	}

	f.DeleteSheet("Sheet1")
	f.SetActiveSheet(0)

	f.AutoFilter("sheet_test", "A1", "E11", "")

	filename := "/tmp/test5.xlsx"

	f.SaveAs(filename)

Describe the results you received:

Xlsx file opens, however no fitlers are displayed in OpenOffice.
When uploading to Office365, filters are displayed.

Describe the results you expected:

OpenOffice to be able to display the auto filter.

Output of go version:

go version go1.13.10 linux/amd64

Excelize version or commit ID:

github.com/360EntSecGroup-Skylar/excelize/v2 v2.3.2

Environment details (OS, Microsoft Excel™ version, physical, etc.):

Ubuntu 18.04
LibreOffice (LibreOffice 6.0.7.3 00m0(Build:3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmedThis issue can be reproduced

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions