GNOME Bugzilla – Bug 724516
header/footer round trip issues
Last modified: 2014-02-24 03:22:15 UTC
header/footer info appears not to round trip through xlsx
Did you mean xls/biff7?
No, I meant ECMA v2 (xlsx). For example if you set the top left to the form (Page 1 of 12), save and reopen, it is gone.
This is now t6503, for multiple formats. biff7 was fixed yesterday. xlsx still fails: - <gnm:Header Left="&[FILE]" Middle="&[TAB]" Right="&[PAGE]/&[PAGES]"/> - <gnm:Footer Left="date:&[DATE]" Middle="&[PATH]" Right="time:&[TIME]"/> + <gnm:Header Left="" Middle="&[TAB]" Right=""/> + <gnm:Footer Left="" Middle="Page &[PAGE]" Right=""/> ods also fails. If this difference is beneign (or unavoidable) then we can tell the test to be quiet. - <gnm:Footer Left="date:&[DATE]" Middle="&[PATH]" Right="time:&[TIME]"/> + <gnm:Footer Left="date:&[DATE:dd-mmm-yyyy]" Middle="&[PATH]" Right="time:&[TIME:hh":"mm]"/>
We now export headers and footers to xlsx. Still no import, but LO is happy with what we write.
The ODF round trip issue has been fixed.
Created attachment 270014 [details] gnumeric file If I save the attached file as ECMA ed 2 (xlsx) and try to open it with Excel 2013 I get an error and the following explanation for the fix: "Replaced Part: /xl/worksheets/sheet1.xml part with XML error. Load error. Line 30, column 16." The opened file has lost its headers/footer and content.
line 30 does not have 16 columns, line 31 does. All of this is in the newly added headerFooter element.
Hmm. Could you try saving the same page setup in Excel to see what it generates?
I have a random file that contains this in one of the sheets. <headerFooter> <oddHeader>&C&"times ,Bold"&12Table A-1 IAFIS Average Transaction Response Times</oddHeader> <oddFooter>&L&"times,Bold"IAFIS-DOC-01078-9.4 Draft EBTS Appendix A&C&"times,Bold"Page A-&P&R&"times,Bold"September 14, 2012</oddFooter> </headerFooter> The file triggering complaints contains... <headerFooter> <oddHeader>&L&A&CPage &P of &N&R&D</oddHeader> <oddFooter>&L&C&T&R</oddFooter> </headerFooter>
there's nothing wrong with the header-footer section, except that Excel wants it *before* <rowBreaks count="0"/> <colBreaks count="0"/>
Excel is very particular about the order of child elements (as specified in the schema). Everybody else is more easy going.
xlsx ought to be fixed. I cannot test from here.
Excel is now happy with the created xlsx file.
xlsx import added. This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.
xls (MS ExcelTM 97/2000/XP & 5.0/95) round trip might work but xls (MS ExcelTM 97/2000/XP & 5.0/95) export does not work correctly. If you save the file of comment #6 as xls (MS ExcelTM 97/2000/XP & 5.0/95) and open it in Excel 2013, and print the file, the header reads: TAB] Page PAGE] of PAGES] DATE] and the footer reads TIME] Apparently we are exporting Gnumeric's tags &[PAGE] etc. rather than the expected tags &P etc. Since round trip works, I suspect we are making a corresponding mistake on import.
We crudely dump them into the file: if (hf->left_format != NULL) { g_string_append (res, "&L"); g_string_append (res, hf->left_format); } I expect some of the translation code I wrote for xlsx can be used for this too.
xls export fixed. (Roundtrip dutifully fails.)
xls import fixed. We roundtrip again, so I'm feeling lucky: This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.