[Libreoffice-bugs] [Bug 118227] XML 2003 Excel import export filter issues

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Jun 20 20:04:47 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=118227

--- Comment #2 from DM <miscellaneous at paintdrawer.co.uk> ---
Two additional bugs.
In the code at the bottom of this comment, if you open it (extension .xml) in
LibreOffice it reads correctly, but now hit Save, close and reopen it, and
you'll see the formatting has gone!
There are in fact two issues with the XML it so saved - firstly it hasn't
written the styles so the number formatting is lost (two decimals seems to be
ok but not 3), and secondly it has skipped writing the formatted blank cell by
using an index on the following one to assert its position, and this means the
blank cell opens without formatting, which is incorrect, as it is very common
to want formatted blank cells - the correct way to write it would be as Excel
does as a Cell without the inner Data tag, i.e.
<Cell ss:StyleID="stylename"/>
Cheers, David

<?xml version="1.0"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:x =
"urn:schemas-microsoft-com:office:excel" xmlns:ss =
"urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<Styles>
<Style ss:ID="s"><Alignment ss:Horizontal="Right"/><NumberFormat
ss:Format="0.000;[Red]\-0.000;0"/></Style>
</Styles>
<Worksheet ss:Name="Sht">
<Table>
<Row>
<Cell ss:StyleID="s"><Data ss:Type="Number">-1</Data></Cell>
<Cell ss:StyleID="s"/>
<Cell ss:StyleID="s"><Data ss:Type="Number">-1</Data></Cell>
</Row>
</Table>
</Worksheet>
</Workbook>

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180620/0ff28278/attachment-0001.html>


More information about the Libreoffice-bugs mailing list