diff options
Diffstat (limited to 'pivotTable.go')
-rw-r--r-- | pivotTable.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pivotTable.go b/pivotTable.go index a197c1f..b7c80c2 100644 --- a/pivotTable.go +++ b/pivotTable.go @@ -485,6 +485,13 @@ func (f *File) addPivotColFields(pt *xlsxPivotTableDefinition, opt *PivotTableOp }) } + //in order to create pivot in case there is many Columns and Many Datas + if len(opt.Data) > 1 { + pt.ColFields.Field = append(pt.ColFields.Field, &xlsxField{ + X: -2, + }) + } + // count col fields pt.ColFields.Count = len(pt.ColFields.Field) return err |