未验证 提交 6251d493 编写于 作者: Z ZX 提交者: GitHub

Fixed invalid shared string table index on set cell value (#1725)

上级 55e4d4b2
......@@ -495,7 +495,7 @@ func (f *File) setSharedString(val string) (int, error) {
val, t.Space = trimCellValue(val, false)
sst.SI = append(sst.SI, xlsxSI{T: &t})
f.sharedStringsMap[val] = sst.UniqueCount - 1
return sst.UniqueCount - 1, nil
return len(sst.SI) - 1, nil
}
// trimCellValue provides a function to set string type to cell.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册