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

The Concat function can't support concatenation of multiple cell values #1569

Closed
podmask opened this issue Jul 6, 2023 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@podmask
Copy link

podmask commented Jul 6, 2023

func TestMyConcat(t *testing.T) {
	t.Log("Start testing ....")
	f, err := excelize.OpenFile("test.xlsx")
	if err != nil {
		t.Error(err)
		return
	}
	defer f.Close()

	f.SetCellValue("Mytest", "A1", "1")
	f.SetCellValue("Mytest", "A2", "2")
	f.SetCellValue("Mytest", "A3", "3")
	f.SetCellValue("Mytest", "A4", "4")
	f.SetCellValue("Mytest", "A5", "5")

	f.SetCellFormula("Mytest", "C5", "CONCAT(A1:A5)")

	value, err := f.CalcCellValue("Mytest", "C5")
	if err != nil {
		t.Error(err)
		return
	}
	t.Logf("The value of Mytest C5 is : %s", value)
}
=========
 go test -v -run ^TestMyConcat$ excelizer/testing
=== RUN   TestMyConcat
    excelize_test.go:54: Start testing ....
    excelize_test.go:73: CONCAT requires arguments to be strings
--- FAIL: TestMyConcat (0.01s)
FAIL
FAIL    excelizer/testing       0.590s
FAIL

Environment details (Windows, Microsoft Excel™ 365, physical, etc.):

@xuri xuri added bug Something isn't working in progress Working in progress labels Jul 6, 2023
@xuri xuri closed this as completed in fb72e56 Jul 6, 2023
@xuri
Copy link
Member

xuri commented Jul 6, 2023

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

@xuri xuri removed the in progress Working in progress label Jul 6, 2023
xuri added a commit to JDavidVR/excelize that referenced this issue Jul 11, 2023
jenbonzhang pushed a commit to jenbonzhang/excelize that referenced this issue Oct 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants