Merge pull request #498 from heiy/master

solve ending space missing
formula
xuri 5 years ago committed by GitHub
commit af100372a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -229,7 +229,7 @@ func (f *File) SetCellStr(sheet, axis, value string) error {
value = value[0:32767]
}
// Leading space(s) character detection.
if len(value) > 0 && value[0] == 32 {
if len(value) > 0 && (value[0] == 32 || value[len(value)-1] == 32) {
cellData.XMLSpace = xml.Attr{
Name: xml.Name{Space: NameSpaceXML, Local: "space"},
Value: "preserve",

Loading…
Cancel
Save