You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2011/06/30 10:42:03 UTC

DO NOT REPLY [Bug 51451] New: When Create a CellStyle, the hidden property default value is true

https://issues.apache.org/bugzilla/show_bug.cgi?id=51451

             Bug #: 51451
           Summary: When Create a CellStyle, the hidden property default
                    value is true
           Product: POI
           Version: unspecified
          Platform: PC
        OS/Version: Windows Server 2003
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: snovian@gmail.com
    Classification: Unclassified


when I export data to excel, if the workbook like
   workbook = new XSSFWorkbook();

and apply a cellstyle as code:
  org.apache.poi.ss.usermodel.CellStyle style =
this.workbook.createCellStyle();
                style.setHidden(false);
                org.apache.poi.ss.usermodel.DataFormat excelFormat =
this.workbook.createDataFormat();
                style.setDataFormat(excelFormat.getFormat(dataFormat));
                sheet.setDefaultColumnStyle(i, style);

I must use setHidden(false) to see the column in exported excel.

But, when workbook = new HSSFWorkbook();  
the style hidden property need not to set!

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org