summaryrefslogtreecommitdiff
path: root/xmlWorksheet.go
diff options
context:
space:
mode:
authorHarris <mike.harris@cerner.com>2019-10-28 10:34:21 -0500
committerHarris <mike.harris@cerner.com>2019-11-05 08:18:11 -0600
commitbf9a8355494eac18812f3caf6d469962824f627f (patch)
tree023a4a3d98b0efcd38860a062f4fe26de81cbb81 /xmlWorksheet.go
parent6abf8bf9723512086f009ca574bde1d6682fc83d (diff)
Reduce allocations when writing
Fix #494 If a row is full, don't bother allocating a new one, just return it. Use the last populated row as a hint for the size of new rows. Simplify checkSheet to remove row map
Diffstat (limited to 'xmlWorksheet.go')
-rw-r--r--xmlWorksheet.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/xmlWorksheet.go b/xmlWorksheet.go
index 96ca235..8408cfa 100644
--- a/xmlWorksheet.go
+++ b/xmlWorksheet.go
@@ -430,6 +430,10 @@ type xlsxC struct {
XMLSpace xml.Attr `xml:"space,attr,omitempty"`
}
+func (c *xlsxC) hasValue() bool {
+ return c.S != 0 || c.V != "" || c.F != nil || c.T != ""
+}
+
// xlsxF directly maps the f element in the namespace
// http://schemas.openxmlformats.org/spreadsheetml/2006/main - currently I have
// not checked it for completeness - it does as much as I need.