Post by Luciano GreinerI've got the same problem... when trying to insert strings with line
breaks it just cut text and show just the part the fits in column.
Thanks
Post by m***@sdm.deHello everybody,
is it possible to tell a HSSFCell that its content should not extend into the next cell but use multiple lines inside the cell as you can do it in Excel?
HSSFWorkbook wb = new HSSFWorkbook();
HSSFCellStyle cellStyle = wb.createCellStyle();
cellStyle.setWrapText(true);
HSSFSheet sheet = wb.createSheet();
HSSFRow row = row = sheet.createRow((short)0);
HSSFCell cell = row.createCell((short)0)
cell.setCellStyle(cellStyle);
cell.setCellValue(
new HSSFRichTextString(" Line 1 \n Line2 ");
);
Will produce a cell where the text will wrap at the line break.
Cheers,
Rc
--
Richard Cote
Software Engineer - PRIDE Project Team (Sequence Database Group)
European Bioinformatics Institute
Wellcome Trust Genome Campus ***@ebi.ac.uk
Hinxton, Cambridge CB10 1SD Phone: (+44) 1223 492610
United Kingdom Fax : (+44) 1223 494468