Uploaded image for project: 'ZK Spreadsheet'
  1. ZK Spreadsheet
  2. ZSS-1135

Gridline doesn't appear after exporting

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 3.8.1
    • Fix Version/s: 3.8.2
    • Component/s: None
    • Security Level: Jean
    • Labels:
      None
    • gh.sprint.customfield.default.name:
      Sprint 1

      Description

      steps to reproduce

      1. export 2014CashSheet.xlsx in ZSS
      2. load the exported file

      actual result

      gridline doesn't appear, even we enable gridline.

      Debug info

      • Copy2014CashSheet.xlsx is exported from 2014CashSheet.xlsx
      • The gridline disappears because those cells have a white right and bottom border specified in style
        <div id="_z_684" class="zscell zshi3 zsw1" zs.t="SCell" style="background-color:#ffffff;border-bottom:solid 1px #ffffff;border-right:solid 1px #ffffff;"><div id="_z_684-cave" ...><div id="_z_684-comment" ...></div></div></div>
        
      • A2's fill pattern is NONE in 2014CashSheet.xlsx, but become SOLID after exporting (in Copy2014CashSheet.xlsx). Therefore, zss renders a white (#ffffff) border for A1 because the code below:
        //border depends on next cell's fill color if solid pattern
        if(!hitBottom && nextFillStyle !=null){
            //String bgColor = BookHelper.indexToRGB(_book, style.getFillForegroundColor());
            //ZSS-34 cell background color does not show in excel
            String bgColor = nextFillStyle.getFillPattern() == FillPattern.SOLID ? 
                    nextFillStyle.getBackColor().getHtmlColor() : null; //ZSS-857
            if (bgColor != null) {
                hitBottom = appendBorderStyle(sb, "bottom", BorderType.THIN, bgColor);
            } else if (nextFillStyle.getFillPattern() != FillPattern.NONE) { //ZSS-841
                sb.append("border-bottom:none;"); // no grid line either
                hitBottom = true;
            }
        }
        

        Attachments

          Activity

            People

            • Assignee:
              henrichen henrichen
              Reporter:
              hawk hawk
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: