Bug 45032 - Save of CALC spreadsheet to HTML fails
Summary: Save of CALC spreadsheet to HTML fails
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.4.4 release
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:3.5 target:3.4.6
Keywords: regression
Depends on:
Blocks:
 
Reported: 2012-01-21 05:43 UTC by ADB
Modified: 2013-11-27 22:33 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sports results spreadsheet with formatting in cells (32.06 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-01-21 05:51 UTC, ADB
Details
HTML-Export of given Sample Spreadsheet with OOo 3.2.1 (345.88 KB, text/html)
2012-01-21 13:35 UTC, famo
Details
Testcase: simple Table with one Chart (12.72 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-01-23 03:49 UTC, famo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ADB 2012-01-21 05:43:34 UTC

    
Comment 1 ADB 2012-01-21 05:51:57 UTC
Created attachment 55906 [details]
Sports results spreadsheet with formatting in cells

Example file showing failure on file saving
Comment 2 ADB 2012-01-21 06:00:23 UTC
(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.
Comment 3 famo 2012-01-21 13:34:35 UTC
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.
Comment 4 famo 2012-01-21 13:35:59 UTC
Created attachment 55929 [details]
HTML-Export of given Sample Spreadsheet with OOo 3.2.1
Comment 5 Cor Nouws 2012-01-21 13:41:52 UTC
adding myself to cc (to try to check later)
Comment 6 famo 2012-01-21 13:45:43 UTC
PS: I checked this here on Windows XP - so changing Platform to all
Comment 7 Eike Rathke 2012-01-22 10:29:42 UTC
Grabbing issue.
Comment 8 Eike Rathke 2012-01-22 11:24:31 UTC
Resolved on master
http://cgit.freedesktop.org/libreoffice/core/commit/?id=d180de79b82d1a73cfd914dd9a1524109c5e78ee

Requested review for 3.5.0 and 3-4
Comment 9 famo 2012-01-23 03:48:02 UTC
@Eike Rathke:
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.
Comment 10 famo 2012-01-23 03:49:03 UTC
Created attachment 56032 [details]
Testcase: simple Table with one Chart
Comment 11 Eike Rathke 2012-01-23 04:47:27 UTC
@famo: yes, the chart thing is fixed as well. In fact all drawing layer graphics objects were affected.
Comment 12 famo 2012-01-23 05:03:52 UTC
Ok, thanks a lot.
Comment 14 famo 2012-01-25 11:34:43 UTC
@Eike:
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
Comment 15 ADB 2012-01-30 14:30:22 UTC
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
Comment 16 Eike Rathke 2012-01-31 04:41:35 UTC
@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..