summaryrefslogtreecommitdiff
path: root/stream.go
diff options
context:
space:
mode:
Diffstat (limited to 'stream.go')
-rw-r--r--stream.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/stream.go b/stream.go
index 0d91ddd..5e74e8e 100644
--- a/stream.go
+++ b/stream.go
@@ -191,13 +191,12 @@ func StreamMarshalSheet(ws *xlsxWorksheet, replaceMap map[string][]byte) []byte
var marshalResult []byte
marshalResult = append(marshalResult, []byte(XMLHeader+`<worksheet`+templateNamespaceIDMap)...)
for i := 0; i < s.NumField(); i++ {
- f := s.Field(i)
content, ok := replaceMap[typeOfT.Field(i).Name]
if ok {
marshalResult = append(marshalResult, content...)
continue
}
- out, _ := xml.Marshal(f.Interface())
+ out, _ := xml.Marshal(s.Field(i).Interface())
marshalResult = append(marshalResult, out...)
}
marshalResult = append(marshalResult, []byte(`</worksheet>`)...)