poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 51037] setDefaultColumnStyle() in XSSFSheet not working
Date Mon, 14 Jul 2014 18:17:36 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=51037

--- Comment #9 from Nick Burch <apache@gagravarr.org> ---
(In reply to maksim.tsilayeu from comment #8)
> it seems like an issue with generated xl\worksheets\sheet1.xml
> 
> If you use sheet.setDefaultColumnStyle then generated xml is missing "s"
> attribute - which is used for style reference, so it looks like:
> &lt;c r="I2" t="n"&gt;&lt;v&gt;41830.0&lt;/v&gt;&lt;/c&gt;
> 
> However if you use cell.setCellStyle then style attribute is generated, so
> it looks like: 
> &lt;c r="I2" t="n" s="1"&gt;&lt;v&gt;41830.0&lt;/v&gt;&lt;/c&gt;

Making changes to the default style on a column won't alter the cells within
that column. If you want to style on specific cell (c element in xlsx) you need
to use cell.setCellStyle on that specific cell.

-- 
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


Mime
View raw message