formula
peiqi 6 years ago
parent 2aca340f5d
commit ef334ee658
No known key found for this signature in database
GPG Key ID: 4CBFC65F975BE247

@ -244,16 +244,17 @@ func (f *File) GetCellFormula(sheet, axis string) string {
if xlsx.SheetData.Row[k].R == row { if xlsx.SheetData.Row[k].R == row {
for i := range xlsx.SheetData.Row[k].C { for i := range xlsx.SheetData.Row[k].C {
if axis == xlsx.SheetData.Row[k].C[i].R { if axis == xlsx.SheetData.Row[k].C[i].R {
if xlsx.SheetData.Row[k].C[i].F == nil {
continue
}
if xlsx.SheetData.Row[k].C[i].F.T == STCellFormulaTypeShared { if xlsx.SheetData.Row[k].C[i].F.T == STCellFormulaTypeShared {
return getSharedForumula(xlsx, xlsx.SheetData.Row[k].C[i].F.Si) return getSharedForumula(xlsx, xlsx.SheetData.Row[k].C[i].F.Si)
} }
if xlsx.SheetData.Row[k].C[i].F != nil {
return xlsx.SheetData.Row[k].C[i].F.Content return xlsx.SheetData.Row[k].C[i].F.Content
} }
} }
} }
} }
}
return "" return ""
} }

Loading…
Cancel
Save