spreadsheet: recompute sheet dimensions prior to save

This commit is contained in:
Todd 2017-09-27 18:13:32 -05:00
parent c5be4536a9
commit 551e748377
3 changed files with 3 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View File

@ -155,6 +155,9 @@ func (wb *Workbook) Save(w io.Writer) error {
}
}
for i, sheet := range wb.xws {
// recalculate sheet dimensions
sheet.Dimension.RefAttr = Sheet{wb, nil, sheet}.Extents()
fn := gooxml.AbsoluteFilename(dt, gooxml.WorksheetType, i+1)
zippkg.MarshalXML(z, fn, sheet)
zippkg.MarshalXML(z, zippkg.RelationsPathFor(fn), wb.xwsRels[i].X())