ONLYOFFICE / DocumentServer

ONLYOFFICE Docs is a free collaborative online office suite comprising viewers and editors for texts, spreadsheets and presentations, forms and PDF, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
https://www.onlyoffice.com
GNU Affero General Public License v3.0
4.48k stars 1.04k forks source link

Border ss:Weight has been ignored when open old XML Spreadsheet 2003 file #2692

Open anatoly-spb opened 1 month ago

anatoly-spb commented 1 month ago

This issue is unique.

Operating System of DocumentServer

Windows Server, Linux (DEB package), Linux (RPM package)

Version information

8.0.1

Expected Behavior

I have XML Spreadsheet 2003 format file with two styles for borders ThinBorder and ThickBorder, for example xml-spreadsheet-2003.xml:

<?xml version="1.0" encoding="utf-8"?><?mso-application progid="Excel.Sheet"?>
<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">
 <ExcelWorkbook>
  <WindowHeight>12210</WindowHeight>
  <WindowWidth>24855</WindowWidth>
  <WindowTopX>240</WindowTopX>
  <WindowTopY>135</WindowTopY>
  <RefModeR1C1/>
  <ProtectStructure>False</ProtectStructure>
  <ProtectWindows>False</ProtectWindows>
 </ExcelWorkbook>
 <Styles>
  <Style ss:ID="Default" ss:Name="Normal">
   <Alignment ss:Vertical="Bottom"/>
   <Borders/>
   <Font ss:FontName="Calibri" x:CharSet="204" x:Family="Swiss" ss:Size="11"
    ss:Color="#000000"/>
   <Interior/>
   <NumberFormat/>
   <Protection/>
  </Style>
  <Style ss:ID="ThinBorder">
   <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:CharSet="204" x:Family="Swiss" ss:Color="#000000"/>
   <Interior ss:Color="#FFFBF0" ss:Pattern="Solid"/>
   <NumberFormat ss:Format="#,##0.0000"/>   
  </Style>   
  <Style ss:ID="ThickBorder">
   <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
   <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="3"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="3"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
   </Borders>
   <Font ss:FontName="Arial" x:CharSet="204" x:Family="Swiss" ss:Color="#000000"/>
   <Interior ss:Color="#FFFBF0" ss:Pattern="Solid"/>
   <NumberFormat ss:Format="#,##0.0000"/>   
  </Style>   
 </Styles>

 <Worksheet ss:Name="Sheet1">
  <Names>
  </Names>
  <Table x:FullColumns="1"  x:FullRows="1" ss:DefaultRowHeight="15">
   <Column ss:AutoFitWidth="0" ss:Width="65.25"/>
   <Column ss:AutoFitWidth="0" ss:Width="63.75"/>

   <Row ss:AutoFitHeight="0" >
       <Cell ss:StyleID="ThinBorder"><Data ss:Type="String">Thin expected</Data>    </Cell>
       <Cell ss:StyleID="ThickBorder"><Data ss:Type="String">Thick expected</Data>  </Cell>
   </Row>
   <Row ss:AutoFitHeight="0" >
       <Cell ss:StyleID="ThinBorder"><Data ss:Type="String">Thin expected</Data>    </Cell>
       <Cell ss:StyleID="ThickBorder"><Data ss:Type="String">Thick expected</Data>  </Cell>
   </Row>
 </Table>
 </Worksheet>
</Workbook>

When I open this file in DesktopEditors I expect to see thin/thick borders: image

Actual Behavior

Actually I see only thin borders:

image

Reproduction Steps

  1. Prepare xml-spreadsheet-2003.xml with the following content:

    <?xml version="1.0" encoding="utf-8"?><?mso-application progid="Excel.Sheet"?>
    <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">
    <ExcelWorkbook>
    <WindowHeight>12210</WindowHeight>
    <WindowWidth>24855</WindowWidth>
    <WindowTopX>240</WindowTopX>
    <WindowTopY>135</WindowTopY>
    <RefModeR1C1/>
    <ProtectStructure>False</ProtectStructure>
    <ProtectWindows>False</ProtectWindows>
    </ExcelWorkbook>
    <Styles>
    <Style ss:ID="Default" ss:Name="Normal">
    <Alignment ss:Vertical="Bottom"/>
    <Borders/>
    <Font ss:FontName="Calibri" x:CharSet="204" x:Family="Swiss" ss:Size="11"
    ss:Color="#000000"/>
    <Interior/>
    <NumberFormat/>
    <Protection/>
    </Style>
    <Style ss:ID="ThinBorder">
    <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
    <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
    </Borders>
    <Font ss:FontName="Arial" x:CharSet="204" x:Family="Swiss" ss:Color="#000000"/>
    <Interior ss:Color="#FFFBF0" ss:Pattern="Solid"/>
    <NumberFormat ss:Format="#,##0.0000"/>   
    </Style>   
    <Style ss:ID="ThickBorder">
    <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
    <Borders>
    <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="3"/>
    <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
    <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="3"/>
    <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
    </Borders>
    <Font ss:FontName="Arial" x:CharSet="204" x:Family="Swiss" ss:Color="#000000"/>
    <Interior ss:Color="#FFFBF0" ss:Pattern="Solid"/>
    <NumberFormat ss:Format="#,##0.0000"/>   
    </Style>   
    </Styles>
    
    <Worksheet ss:Name="Sheet1">
    <Names>
    </Names>
    <Table x:FullColumns="1"  x:FullRows="1" ss:DefaultRowHeight="15">
    <Column ss:AutoFitWidth="0" ss:Width="65.25"/>
    <Column ss:AutoFitWidth="0" ss:Width="63.75"/>
    
    <Row ss:AutoFitHeight="0" >
       <Cell ss:StyleID="ThinBorder"><Data ss:Type="String">Thin expected</Data>    </Cell>
       <Cell ss:StyleID="ThickBorder"><Data ss:Type="String">Thick expected</Data>  </Cell>
    </Row>
    <Row ss:AutoFitHeight="0" >
       <Cell ss:StyleID="ThinBorder"><Data ss:Type="String">Thin expected</Data>    </Cell>
       <Cell ss:StyleID="ThickBorder"><Data ss:Type="String">Thick expected</Data>  </Cell>
    </Row>
    </Table>
    </Worksheet>
    </Workbook>
  2. Open this file in DesktopEditors as Table

Additional information

No response

anatoly-spb commented 1 month ago

Also I have prepared file with All Border Line Styles which can be used as marker of correctness.

Here is Excel: image

Here is ONLYOFFICE Editor: image

You can see the problem.

Rita-Bubnova commented 1 month ago

Hello @anatoly-spb, thank you for the report. I can confirm - this is a bug, issue #67453.