summaryrefslogtreecommitdiff
path: root/stream.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2022-07-18 00:21:34 +0800
committerxuri <xuri.me@gmail.com>2022-07-18 00:21:34 +0800
commitebea684ae5c60776d4d8364b7360d0c0603cb3b0 (patch)
tree257562b2549f81ed8593cdd2eaa39ac55652b79a /stream.go
parent0d4c97c88aa9254a4db5a0b9192d0f431ff90e43 (diff)
Fix potential file corrupted and change worksheet name case-insensitive
- Using sheet ID instead of sheet index when delete the cell in calculation chain - Update documentation for exported functions - Using `sheet` represent the sheet name in the function parameters
Diffstat (limited to 'stream.go')
-rw-r--r--stream.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/stream.go b/stream.go
index 0db2438..1a1af24 100644
--- a/stream.go
+++ b/stream.go
@@ -106,11 +106,11 @@ func (f *File) NewStreamWriter(sheet string) (*StreamWriter, error) {
return nil, err
}
- sheetPath := f.sheetMap[trimSheetName(sheet)]
+ sheetXMLPath, _ := f.getSheetXMLPath(sheet)
if f.streams == nil {
f.streams = make(map[string]*StreamWriter)
}
- f.streams[sheetPath] = sw
+ f.streams[sheetXMLPath] = sw
_, _ = sw.rawData.WriteString(xml.Header + `<worksheet` + templateNamespaceIDMap)
bulkAppendFields(&sw.rawData, sw.worksheet, 2, 5)