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

When using DuplicateRow, it is not duplicated correctly when there are multiple merged cells. #752

Closed
yuki2006 opened this issue Dec 21, 2020 · 1 comment
Labels
confirmed This issue can be reproduced
Projects

Comments

@yuki2006
Copy link
Contributor

yuki2006 commented Dec 21, 2020

Description

When duplicating a row with multiple merged cells, the cells that are used correctly are not copied.

Perhaps this i++ skips the loop step.

https://github.com/360EntSecGroup-Skylar/excelize/blob/77978ac68d3808060e58df41ebede4b9f3631641/rows.go#L605

Steps to reproduce the issue:
1.

	f, err := excelize.OpenFile("../../.ignore/B.xlsx")
	if err != nil {
		panic(err)
	}
	sheet := f.GetSheetName(0)
	err = f.DuplicateRowTo(sheet, 1, 3)
	if err != nil {
		panic(err)
	}
	err = f.SaveAs("../../.ignore/B_.xlsx")
	if err != nil {
		panic(err)
	}

Describe the results you received:

image

Describe the results you expected:

Want the same thing as the 1 col to be the 3 col.

Output of go version:

go 1.15

Excelize version or commit ID:

77978ac68d3808060e58df41ebede4b9f3631641

@xuri xuri added the confirmed This issue can be reproduced label Dec 21, 2020
@xuri xuri closed this as completed in 5c6bdf6 Dec 22, 2020
xuri added a commit that referenced this issue Dec 22, 2020
…new formula function: LOWER, PROPER, UPPER
@xuri
Copy link
Member

xuri commented Dec 22, 2020

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

@xuri xuri added this to Bugfix in v2.3.2 Dec 22, 2020
jenbonzhang pushed a commit to jenbonzhang/excelize that referenced this issue Oct 22, 2023
…, and new formula function: LOWER, PROPER, UPPER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed This issue can be reproduced
Projects
No open projects
v2.3.2
Bugfix
Development

No branches or pull requests

2 participants