Bug 37878 - Conditional formatting not exported correctly to XHTML
Summary: Conditional formatting not exported correctly to XHTML
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 82401 115223 154267 (view as bug list)
Depends on:
Blocks: Conditional-Formatting (X)HTML-Export
  Show dependency treegraph
 
Reported: 2011-06-03 07:12 UTC by dave.mueller
Modified: 2023-03-26 10:22 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
simple Calc test case (7.66 KB, application/vnd.oasis.opendocument.spreadsheet)
2011-06-03 07:12 UTC, dave.mueller
Details
simple testcase exported to HTML (background colors missing) (2.74 KB, text/html)
2011-06-03 07:14 UTC, dave.mueller
Details
Testcase exporte to HTML with LO 3.5 beta (background colors OK) (1.26 KB, text/html)
2012-01-21 14:34 UTC, famo
Details
new test ODS to export to XHTML (with extra non-conditional example) (10.70 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-06-23 12:09 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dave.mueller 2011-06-03 07:12:10 UTC
Created attachment 47475 [details]
simple Calc test case

Fields containing conditional formatting instructions (e.g. background color depending on field value) are not correctly exported to HTML. The browser preview launched from Calc looks ok, but if the exported HTML file is loaded into the browser, the conditional formatting is gone. Export to PDF is also ok.

P.S.
This problem has already been reported as OpenOffice bug
http://openoffice.org/bugzilla/show_bug.cgi?id=103909 and is present in all currently available LibreOffice versions.
Comment 1 dave.mueller 2011-06-03 07:14:13 UTC
Created attachment 47476 [details]
simple testcase exported to HTML (background colors missing)
Comment 2 dave.mueller 2011-07-01 13:57:39 UTC Comment hidden (obsolete)
Comment 3 dave.mueller 2011-08-01 06:08:53 UTC Comment hidden (obsolete)
Comment 4 dave.mueller 2011-09-03 23:54:02 UTC Comment hidden (obsolete)
Comment 5 dave.mueller 2011-11-09 09:51:11 UTC Comment hidden (obsolete)
Comment 6 Björn Michaelsen 2011-12-23 12:07:00 UTC Comment hidden (obsolete)
Comment 7 famo 2012-01-21 14:33:16 UTC Comment hidden (obsolete)
Comment 8 famo 2012-01-21 14:34:08 UTC Comment hidden (obsolete)
Comment 9 Florian Reisinger 2012-08-14 14:00:18 UTC Comment hidden (obsolete)
Comment 10 Florian Reisinger 2012-08-14 14:01:25 UTC Comment hidden (obsolete)
Comment 11 Florian Reisinger 2012-08-14 14:06:09 UTC Comment hidden (obsolete)
Comment 12 Florian Reisinger 2012-08-14 14:08:10 UTC Comment hidden (obsolete)
Comment 13 sasha.libreoffice 2012-09-07 07:09:13 UTC
reproduced in 3.6.1 on Fedora 64 bit. Reopening
Used File->Export, variant HTML

(File->Save as works correctly)
Comment 14 Thomas Arnhold 2013-10-15 00:22:44 UTC
NOT reproducible anymore with:

Version: 4.1.2.3
Build ID: 40b2d7fde7e8d2d7bc5a449dc65df4d08a7dd38
Comment 15 dave.mueller 2013-10-15 07:31:31 UTC
Sorry, but the problem is still present.

Tested on Linux i386, LO: 4.1.2.3
Build ID: 40b2d7fde7e8d2d7bc5a449dc65df4d08a7dd38
Comment 16 sasha.libreoffice 2013-10-15 08:57:20 UTC
Also reproduced on Win8 64 bit
used File->Export, variant HTML
Comment 17 raal 2014-09-15 15:15:36 UTC
*** Bug 82401 has been marked as a duplicate of this bug. ***
Comment 18 gekacheka 2014-09-17 02:50:21 UTC
1. Be aware that Export... HTML is not the same as Save as... HTML, they produce different files.  (I guess the intent is for Export HTML to produce canonical HTML; and Save as HTML adds many non-standard attributes to preserve spreadsheet state, such as the original values before formatting, the number formats, formulas, etc., so that the spreadsheet can be recovered by opening it.)

2. bug 82401 is about color scales (color intensity from numeric value).  It shows an example using save-as-html where boolean conditional formatting works, but color scale does not.  (So the features could be fixed independently.)   It also has an example showing that neither works for export-html.
Comment 19 QA Administrators 2015-10-14 19:57:36 UTC Comment hidden (obsolete)
Comment 20 dave.mueller 2015-10-15 12:19:39 UTC
The problem is still present.

Tested on Linux i386, LO: Version: 5.0.2.2
Build-ID: 37b43f919e4de5eeaca9b9755ed688758a8251f
Comment 21 321Peto 2016-02-08 03:26:45 UTC
Subtext in cell is formated as bold and red color ("black red black text"). All text is black when export ods to html.
Comment 22 Martin 2017-01-23 18:27:20 UTC
Version: 5.1.6.2

Numeric cells with red text format such as:
   [$$-409]#,##0.00;[RED]-[$$-409]#,##0.00

Render black on resulting files from actions:
    Save as HTML
    Export to XHTML
Comment 23 Julien Nabet 2017-06-15 20:16:43 UTC
Put back former version since this field must contains the earliest version which has this bug.
Comment 24 Xavier Van Wijmeersch 2017-07-17 19:52:59 UTC
I tested export and save as; formatting is not saved in html
problem is still present

Version: 6.0.0.0.alpha0+
Build ID: 8c82e4877181f55f2fe186b341d504e5782a4f9c
CPU threads: 8; OS: Linux 4.9; UI render: default; VCL: kde4; 
Locale: nl-BE (en_US.UTF-8); Calc: group
Comment 25 raal 2018-01-27 07:56:00 UTC
*** Bug 115223 has been marked as a duplicate of this bug. ***
Comment 26 QA Administrators 2019-09-22 02:59:36 UTC Comment hidden (obsolete)
Comment 27 dave.mueller 2019-09-23 09:46:35 UTC
The problem is still present.

Tested on Linux i386, LO: Version: 6.2.7.1
Build-ID: 23edc44b61b830b7d749943e020e96f5a7df63bf

Tested on Windows amd64, LO: Version: 6.3.1.2 (x64)
Build ID: b79626edf0065ac373bd1df5c28bd630b4424273
Comment 28 Martin 2019-09-23 17:14:30 UTC
Version: 6.0.7.3

Numeric cells with red text format such as:
   [$$-409]#,##0.00;[RED]-[$$-409]#,##0.00

Render black on resulting files from actions:
    Save as HTML
    Export to XHTML
Comment 29 Stéphane Guillou (stragu) 2021-06-23 12:06:52 UTC
Reproduced with attachment 47475 [details] export to XHTML with: File > Export... > XHTML

(works as expected with Save as > HTML, which makes use of the <td> bgcolor attribute)

Note that this is not limited to the background colour. It also ignore formatting like bold, italic, font colour... linked to the conditional formatting.

Version:

Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: e3086b58eb5427d520b86c185f9d911bb6f7a3a0
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-06-21_15:37:11
Calc: threaded

and:

Version: 7.2.0.0.beta1 / LibreOffice Community
Build ID: c6974f7afec4cd5195617ae48c6ef9aacfe85ddd
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

and:

Version: 7.0.6.2
Build ID: 144abb84a525d8e30c9dbbefa69cbbf2d8d4ae3b
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 30 Stéphane Guillou (stragu) 2021-06-23 12:09:59 UTC
Created attachment 173104 [details]
new test ODS to export to XHTML (with extra non-conditional example)

Adding a new test ODS based on the original one, with another conditional formatting that also changes the font colour and style, and with cells formatted non-conditionally.
Comment 31 Roman Kuznetsov 2023-03-26 10:22:05 UTC
*** Bug 154267 has been marked as a duplicate of this bug. ***