Bug 116720 - LibreOffice Calc does not read its own HTML attributes (save as)
Summary: LibreOffice Calc does not read its own HTML attributes (save as)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:html
Depends on:
Blocks: HTML-Import
  Show dependency treegraph
 
Reported: 2018-03-31 11:44 UTC by chris
Modified: 2019-06-13 03:00 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
1-original spreadsheet (9.05 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-04-09 00:22 UTC, chris
Details
2- html export (2.13 KB, text/html)
2018-04-09 00:22 UTC, chris
Details
3- html import (9.00 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-04-09 00:26 UTC, chris
Details

Note You need to log in before you can comment on or make changes to this bug.
Description chris 2018-03-31 11:44:06 UTC
Description:
I'm trying to find out how to create HTML tables which can be read back by Libreoffice consistently.

I've created cells with numbers, applied various formatting rules, e.g. date, currency.

Libreoffice will save the cell value in the <td sdval="xx"> attribute, and save the formatting e.g. "0.00; [RED] -0.00" in the <td sdnum="xx"> attribute. However it does not re-read the sdnum values consistently. If sdnum is simple "3081;0;0.00" it is parsed in. If sdnum is a custom string like "3081;0;&quot;Rs&quot; 0.00" then it is ignored. 

Steps to Reproduce:
1. Create simple spreadsheet with numbers
2. Format numbers with variety of formats (especially "custom string formatting")
3. Export to html
4. Close Calc, reopen calc, open html


Actual Results:  
1. Some formatting is lost

Expected Results:
1. Either all formatting is lost, or all valid formatting is retrieved!


Reproducible: Always


User Profile Reset: No



Additional Info:
Libreoffice could choose to save metadata in a [CDATA[]] format if it wished


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0
Comment 1 Buovjaga 2018-04-02 17:18:32 UTC
(In reply to chris from comment #0)
> 1. Create simple spreadsheet with numbers
> 2. Format numbers with variety of formats (especially "custom string
> formatting")

Please attach an example file.

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the document.
Comment 2 chris 2018-04-09 00:22:33 UTC
Created attachment 141217 [details]
1-original spreadsheet
Comment 3 chris 2018-04-09 00:22:58 UTC
Created attachment 141218 [details]
2- html export
Comment 4 chris 2018-04-09 00:26:23 UTC
Created attachment 141219 [details]
3- html import

Attachments as requested.

Note the currency (format [$$-C09]#,##0.00;[RED]-[$$-C09]#,##0.00) is correctly re-read but the custom format "$"0.00 is not re-read.

My issue is that I am hand-crafting HTML reports and I hoped they could be re-read into Libreoffice, but I cannot know the Libreoffice currency ID C09 in [$$-C09].
Comment 5 Buovjaga 2018-04-09 18:51:45 UTC
Reproduced.

The attributes are added to the HTML only using Save as, not Export.

Arch Linux 64-bit
Version: 6.1.0.0.alpha0+
Build ID: d4c0e7ef2b7f7e3cb36996bad72ac255b630beb4
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on April 8th 2018
Comment 6 malboarg 2018-06-12 19:30:24 UTC
This bug is still present in
Version: 6.0.5.1
Build ID: 0588a1cb9a40c4a6a029e1d442a2b9767d612751
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2;

Even though is still present, using the the given example,in my test the second line loses decimals, not the 4th.

Number	                1	-2	3
Number 2dp	        1	-2	3
Currency (with code)	$1,00	($2,00)	$3,00
Currency (str)	        $1,00	($2,00)	$3,00
 
When,from calc,I open the exported html, I use the option "Detect Special numbers(such as dates)"
=============================================================================
This bug is still present in
Version: 6.1.0.0.beta1
Build ID: 8c76dfe1284e211954c30f219b3a38dcdd82f8a0
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 

"save as" instead of export, works fine.
Comment 7 QA Administrators 2019-06-13 03:00:46 UTC
Dear chris,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug