mirror of
https://github.com/unidoc/unioffice.git
synced 2025-04-25 13:48:53 +08:00
interim
This commit is contained in:
parent
e00296f899
commit
01bceae1db
@ -68,6 +68,11 @@ func NewStyleSheet(wb *Workbook) StyleSheet {
|
||||
|
||||
ss.CellXfs.Xf = append(ss.CellXfs.Xf, xf2)
|
||||
ss.CellXfs.CountAttr = gooxml.Uint32(uint32(len(ss.CellXfs.Xf)))
|
||||
|
||||
ss.TableStyles = sml.NewCT_TableStyles()
|
||||
ss.TableStyles.DefaultPivotStyleAttr = gooxml.String("PivotStyleMedium7")
|
||||
ss.TableStyles.DefaultTableStyleAttr = gooxml.String("TableStyleMedium9")
|
||||
|
||||
return s
|
||||
}
|
||||
|
||||
|
@ -630,7 +630,8 @@ func (wb *Workbook) AddPivotTable() PivotTable {
|
||||
wb.pivotCache = append(wb.pivotCache, pcache)
|
||||
crel := common.NewRelationships()
|
||||
wb.pivotCacheRels = append(wb.pivotCacheRels, crel)
|
||||
crel.AddAutoRelationship(gooxml.DocTypeSpreadsheet, gooxml.PivotCacheDefinitionType, len(wb.pivotCache), gooxml.PivotCacheRecordsType)
|
||||
recID := crel.AddAutoRelationship(gooxml.DocTypeSpreadsheet, gooxml.PivotCacheDefinitionType, len(wb.pivotCache), gooxml.PivotCacheRecordsType)
|
||||
pcache.IdAttr = gooxml.String(recID.ID())
|
||||
|
||||
precs := sml.NewPivotCacheRecords()
|
||||
wb.pivotRecords = append(wb.pivotRecords, precs)
|
||||
@ -649,8 +650,6 @@ func (wb *Workbook) AddPivotTable() PivotTable {
|
||||
|
||||
pvd.CacheIdAttr = uint32(pc.CacheIdAttr)
|
||||
|
||||
// TODO: make configurable
|
||||
pcache.IdAttr = gooxml.String("rId1")
|
||||
pvd.Location.FirstHeaderRowAttr = 1
|
||||
pvd.Location.FirstDataRowAttr = 2
|
||||
pvd.Location.FirstDataColAttr = 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user