Well, there is an option to center - no, pre Webster so it ought to be centre - the cells contents across a selection in the CellStyle class just as there is in Excel, but like you, I cannot see how to obviously make use of it. Currently, I am thinking about trying to use the ability to create a name to see if that will help but I cannot be sure.
Do you know in advance which cells need to be treated in this way? If so, you could create a template that POI would then be able to open and populate with data. Secondly, if you do know which cells are to be treated in this way, you could create styles on another sheet in the workbook and then try applying them to other cells in another sheet of the same workbook. Again, I do not know if this would work but it should be quick enough and easy enough to try out. When I get back homw after work today, I will have a play to see what I can come up with. Yours Mark B Cristian Petrula wrote: > > Hi. I have a huge problem. I need to use ALIGN_CENTER_SELECTION over 2, > 3.. > cells but I am not allowed to merge cells And I don't have any idea how to > simulate cell selection. I saw in xml file attribute "spans" in row > element. > Do you know how to use this align style with selected cells? > > Cristian > > -- View this message in context: http://old.nabble.com/ALIGN_CENTER_SELECTION-question-tp28660795p28665054.html Sent from the POI - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@poi.apache.org For additional commands, e-mail: user-h...@poi.apache.org