diff options
author | xuri <xuri.me@gmail.com> | 2018-11-08 12:37:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-08 12:37:42 +0800 |
commit | 507fc5307d17194203046321534244a8fe6215ed (patch) | |
tree | 8ecfe22ce8fc073310d735f0f5b4feac331b221f /cell.go | |
parent | 2aca340f5d8358828f2d6c889d50fd34693ecfe7 (diff) | |
parent | ef334ee658e6d4d7279e3a12e292d8c8f3800f77 (diff) |
Merge pull request #291 from peiqi111/master
resolve #289, #290
Diffstat (limited to 'cell.go')
-rw-r--r-- | cell.go | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 } } } |