Skip to content

Found a defect in the FIND function during the process of multi-value query. #1819

@podmask

Description

@podmask

Description

func TestMyTest(t *testing.T) {
	f, err := excelize.OpenFile("../test.xlsx")
	if err != nil {
		fmt.Println(err)
		return
	}
	defer f.Close()
	f.SetCellValue("sheet1", "D2", "张三")
	f.SetCellFormula("sheet1", "B2", `OR(ISNUMBER(FIND({"王五","李四","张三","陈七","刘大"},D2)))`)
	value, err := f.CalcCellValue("sheet1", "B2")
	if err != nil {
		fmt.Println("ERROR:", err)
		return
	}
	t.Log("value is:", value)
}

Steps to reproduce the issue:

  1. Run this test.

Describe the results you received:

=== RUN   TestMyTest
    d:\DEV\go-dev\excelizer\testing\excel_test.go:99: value is: FALSE
--- PASS: TestMyTest (0.01s)
PASS
ok  	excelizer/testing	0.271s

Describe the results you expected:

=== RUN   TestMyTest
    d:\DEV\go-dev\excelizer\testing\excel_test.go:99: value is: TRUE
--- PASS: TestMyTest (0.01s)
PASS
ok  	excelizer/testing	0.271s

Output of go version:

(paste your output here)

Excelize version or commit ID:
WPS

(paste here)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions