Demos and Usage of org.apache.poi.hssf.usermodel.HSSFCell.HSSFCell.CELL_TYPE_STRING


   1:         c = r.createCell( (short) 2 );
   2:         c.setCellType( HSSFCell.CELL_TYPE_STRING );
   3:         c.setCellValue( "Use \n with word wrap on to create a new line" );
   4:         c.setCellStyle( cs );
   5:         s.setColumnWidth( (short) 2, (short) ( ( 50 * 8 ) / ( (double) 1 / 20 ) ) );

View Full Code Here
   1:                 cell = row.createCell((short)3);
   2:             cell.setCellType(HSSFCell.CELL_TYPE_STRING);
   3:             cell.setCellValue("a test");
   4: 
   5:             fileOut = new FileOutputStream("workbookout.xls");

View Full Code Here
   1:                   break;
   2:                 case HSSFCell.CELL_TYPE_STRING : 
   3:                   text =text + cell.getStringCellValue().toString() + " ";
   4:                   break ;
   5:                 default :

View Full Code Here
   1:                                     break;
   2:                                 case HSSFCell.CELL_TYPE_STRING:
   3:                                     try {
   4:                                         String text = cell.getStringCellValue().trim();
   5:                                         if(text.length() > 0)

View Full Code Here
   1:         if (expected != null && actual!=null) {
   2:             if (expected!=null && expected.getCellType() == HSSFCell.CELL_TYPE_STRING) {
   3:                 String value = expected.getRichStringCellValue().getString();
   4:         ...
   5:                     break;
   6:                 case HSSFCell.CELL_TYPE_STRING:
   7:         ...
   8:                     assertEquals(msg, HSSFCell.CELL_TYPE_STRING, actual.getCellType());
   9:                     assertEquals(msg, expected.getRichStringCellValue().getString(), actual.getRichTextStringValue().getString());

View Full Code Here
   1:             }
   2:             case HSSFCell.CELL_TYPE_STRING: {
   3:                 value = cell.getStringCellValue();
   4:                 break;
   5:             }

View Full Code Here
   1:           break;
   2:         case HSSFCell.CELL_TYPE_STRING:
   3:           editor.setText(cell.getRichStringCellValue().getString());
   4:           break;
   5:         case HSSFCell.CELL_TYPE_FORMULA:

View Full Code Here
   1:                                         break;
   2:                                     case HSSFCell.CELL_TYPE_STRING:
   3:                                     default:
   4:                                         text = cell.getStringCellValue();
   5:                                         break;

View Full Code Here
   1:     protected void setText(HSSFCell cell, String text) {
   2:         cell.setCellType(HSSFCell.CELL_TYPE_STRING);
   3:         cell.setCellValue(text);
   4:     }

View Full Code Here
   1:               break;
   2:               case HSSFCell.CELL_TYPE_STRING:
   3:                 setValue(c.getRichStringCellValue().getString());
   4:               break;
   5:               case HSSFCell.CELL_TYPE_FORMULA:

View Full Code Here
   1:                 c = r.createCell(( short ) (cellnum + 1),
   2:                                  HSSFCell.CELL_TYPE_STRING);
   3:                 c.setCellValue("TEST");
   4:         ...
   5: 
   6:                 cell.setCellType(HSSFCell.CELL_TYPE_STRING);
   7:                 cell.setCellValue("MODIFIED CELL!!!!!");
   8: 
   9:                 wb.write(stream);

View Full Code Here
   1:             {
   2:                 cell.setCellType(HSSFCell.CELL_TYPE_STRING);
   3:                 if(cell.getStringCellValue()!= null){
   4:         ...
   5:                 {
   6:                     pwCell.setCellType(HSSFCell.CELL_TYPE_STRING);
   7:                     if(pwCell.getStringCellValue()!= null){
   8:         ...
   9:             {
  10:                 cell.setCellType(HSSFCell.CELL_TYPE_STRING);
  11:                 if(cell.getStringCellValue()!= null){

View Full Code Here