Bug 51451 - When Create a CellStyle, the hidden property default value is true
Summary: When Create a CellStyle, the hidden property default value is true
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: unspecified
Hardware: PC Windows Server 2003
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2011-06-30 08:42 UTC by Simon
Modified: 2015-08-23 19:34 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Simon 2011-06-30 08:42:03 UTC
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();
				org.apache.poi.ss.usermodel.DataFormat excelFormat = this.workbook.createDataFormat();
				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!
Comment 1 Dominik Stadler 2015-08-23 19:34:38 UTC
I could not reproduce this problem any more with the latest version so it is likely fixed since some time already. 

Please re-test with 3.12-beta1 or a recent nightly build and reopen this bug if this is still a problem for you.