We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Description
Steps to reproduce the issue:
func copyStyle(f *excelize.File, src, dst string) error { styleID, err := f.GetCellStyle("Sheet1", src) if err != nil { return err } style, err := f.GetStyle(styleID) if err != nil { return err } if style.Font == nil { style.Font = &excelize.Font{} } style.Font.Strike = true newStyleID, err := f.NewStyle(style) if err != nil { return err } err = f.SetCellValue("Sheet1", dst, "Hello world.") if err != nil { return err } err = f.SetCellStyle("Sheet1", dst, dst, newStyleID) if err != nil { return err } return nil } func main() { f, err := excelize.OpenFile("Book1.xlsx") if err != nil { panic(err) } err = copyStyle(f, "A1", "B1") if err != nil { panic(err) } err = copyStyle(f, "A2", "B2") if err != nil { panic(err) } err = f.SaveAs("Book2.xlsx") if err != nil { panic(err) } }
Describe the results you received:
Describe the results you expected:
I want both to remain in their original style without becoming bottom-aligned.
Output of go version:
go version
go version go1.21.3 darwin/arm64
Excelize version or commit ID:
github.com/xuri/excelize/v2 v2.8.0
Environment details (OS, Microsoft Excel™ version, physical, etc.):
The text was updated successfully, but these errors were encountered:
4e936da
Thanks for your issue. This issue has been fixed, please try to upgrade the master branch code, and this patch will be released in the next version.
Sorry, something went wrong.
No branches or pull requests
Description
Steps to reproduce the issue:
Book2.xlsx
Describe the results you received:
Describe the results you expected:
I want both to remain in their original style without becoming bottom-aligned.
Output of
go version
:Excelize version or commit ID:
Environment details (OS, Microsoft Excel™ version, physical, etc.):
The text was updated successfully, but these errors were encountered: