GNOME Bugzilla – Bug 378560
gnumeric->xls->gnumeric roundtrip issues
Last modified: 2006-11-25 02:58:46 UTC
gunzip < ../samples/regress.gnumeric >old ../src/ssconvert ../samples/regress.gnumeric regress.xls ../src/ssconvert regress.xls regress2.gnumeric gunzip < regress2.gnumeric >new diff -u old new | less Near the bottom we see this hunk. The rounding is probably not important, but how did "HardSize" show up? @@ -872,13 +783,13 @@ </gnm:StyleRegion> </gnm:Styles> <gnm:Cols DefaultSizePts="48"> - <gnm:ColInfo No="0" Unit="65.25" HardSize="1"/> - <gnm:ColInfo No="1" Unit="66.75"/> - <gnm:ColInfo No="2" Unit="35.25"/> - <gnm:ColInfo No="3" Unit="261"/> - <gnm:ColInfo No="4" Unit="61.5"/> - <gnm:ColInfo No="5" Unit="56.25"/> - <gnm:ColInfo No="6" Unit="79.5"/> + <gnm:ColInfo No="0" Unit="65.26" HardSize="1"/> + <gnm:ColInfo No="1" Unit="66.76" HardSize="1"/> + <gnm:ColInfo No="2" Unit="35.26" HardSize="1"/> + <gnm:ColInfo No="3" Unit="261" HardSize="1"/> + <gnm:ColInfo No="4" Unit="61.5" HardSize="1"/> + <gnm:ColInfo No="5" Unit="56.26" HardSize="1"/> + <gnm:ColInfo No="6" Unit="79.5" HardSize="1"/> </gnm:Cols> <gnm:Rows DefaultSizePts="12.8"> <gnm:RowInfo No="0" Unit="12.75" Count="2"/>
This problem stemmed from apparent limitations in the xls format. The docs did not list any flags that would represent 'hard_size' so I assumed that if there was a COLINFO record it must mean that the size was explicitly set. That ignored bestFit columns that were autosized to something non-standard. Reading the OfficeOpen docs and a closer look at the xls suggested that there were two undocumented flags. 1.7.5 has a patch to handle these for xls and xlsx.