Merge pull request #291 from peiqi111/master

resolve #289, #290
This commit is contained in:
xuri 2018-11-08 12:37:42 +08:00 committed by GitHub
commit 507fc5307d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -244,12 +244,13 @@ func (f *File) GetCellFormula(sheet, axis string) string {
if xlsx.SheetData.Row[k].R == row {
for i := range xlsx.SheetData.Row[k].C {
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 {
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
}
}
}