Closed ccaiy9 closed 3 months ago
Thanks for your issue.
go get -u github.com/xuri/excelize/v2@master
, and this patch will be released in the next released version. Note that, you need also create a style with the wrap text format by the NewStyle
function, you will get a style ID, and set the cell with wrap text style by stream writer: styleID, err := file.NewStyle(&excelize.Style{
Alignment: &excelize.Alignment{WrapText: true},
})
if err != nil {
fmt.Println(err)
return
}
// ...
interfaceFields[1] = excelize.Cell{
StyleID: styleID,
Value: "等\n",
}
Steps to reproduce the issue:
import ( "fmt" "github.com/xuri/excelize/v2" )
func main() { var err error
}
Excelize version or commit ID:
Environment details (OS, Microsoft Excel™ version, physical, etc.):
centos