Created attachment 55906 [details]
Sports results spreadsheet with formatting in cells
Example file showing failure on file saving
(Don't know why I need to re-insert all this - have done it once before)
On saving a CALC spreadsheet to HTML, the output is incomplete, wrongly formatted and missing data cell contents
Fails in both BASIC macro operation and FILE>SAVE AS operation
Attached file contains Macros but these are a direct translation of the EXCEL BASIC originals so may not be perfect nor the most efficient - OpenOffice/LibreOffice BASIC not being very intuitive.
I can assure you that there is nothing nasty in the macro.
Nevertheless, it doesn't explain why the FILE>SAVE AS ... (HTML option) fails as well.
I checked your file U15Leagues20112012.ods both in LO 3.4 and 3.5 beta.
If you choose save as HTML, the HTML files are rather messed up.
However if you remove the Form Controls (the Drawing objects "Button 1" and "Button 2"), the tables are exported as expected.
This applies both to 3.4 and 3.5.
I also tested with OOo 3.2.1: the export to HTML is fine here - in any case.
I set the status of this is bug to new.
However this may be a duplicate.
Also adding keyword regression.
Created attachment 55929 [details]
HTML-Export of given Sample Spreadsheet with OOo 3.2.1
adding myself to cc (to try to check later)
PS: I checked this here on Windows XP - so changing Platform to all
Resolved on master
Requested review for 3.5.0 and 3-4
I noticed also that tables with charts are not exported to HTML as expected. This applies both to LO 3.4 and 3.5, whereas it works fine in OOo 3.2.1
Can you check if your patch fixes this as well, or shall I fill in a new bug for this?
I'll attach a sample testcase.
Created attachment 56032 [details]
Testcase: simple Table with one Chart
@famo: yes, the chart thing is fixed as well. In fact all drawing layer graphics objects were affected.
Ok, thanks a lot.
Pushed to 3-5
Is HTML import/export your field of expertise?
Maybe you want check these issues?:
Bug 45239 FILESAVE: Export to HTML - Use PNG for charts instead of JPG
Bug 45084 FILEOPEN: Cannot open HTML Files in Calc
Bug 40218 FILEOPEN: Calc confused by unclosed HTML tags
Bug 36447 FORMATTING HTML formatting problems
If this indeed has been fixed, I would like to thank Eike Rathke for finding a solution so promptly.
I am surprised that no-one has noticed this 'feature' before as I would have thought that exporting spreadsheets for use in an HTML environment would have been quite a common occurrence.
I shall eagerly await the update in the next release of LibreOffice.
Once again, many thanks
@ADB: thanks for the flowers, a pleasure :)
@famo: I'm not the general HTML expert, but I did the initial Calc HTML stuff over a decade ago..