Package org.xlsx4j.sml

Examples of org.xlsx4j.sml.Cell


          // Minimal content already present
          SheetData sheetData = sheet.getContents().getSheetData();

          // Now add
          Row row = Context.getsmlObjectFactory().createRow();
          Cell cell = Context.getsmlObjectFactory().createCell();
          cell.setV("1234");
          row.getC().add(cell);


          row.getC().add(createCell("hello world!"));
          sheetData.getRow().add(row);
View Full Code Here


      }

      private static Cell createCell(String content) {

          Cell cell = Context.getsmlObjectFactory().createCell();

          CTXstringWhitespace ctx = Context.getsmlObjectFactory().createCTXstringWhitespace();
          ctx.setValue(content);

          CTRst ctrst = new CTRst();
          ctrst.setT(ctx);

          cell.setT(STCellType.INLINE_STR);
          cell.setIs(ctrst); // add ctrst as inline string

          return cell;

      }
View Full Code Here

         
    row.setHt(66.0);
    row.setCustomHeight(Boolean.TRUE);
    row.setR(1L);
         
    Cell cell1 = Context.getsmlObjectFactory().createCell();
    cell1.setV("1234");
    row.getC().add(cell1);
         
    Cell cell2 = Context.getsmlObjectFactory().createCell();
    cell2.setV("56");
    row.getC().add(cell2);
    sheetData.getRow().add(row);
               
    SaveToZipFile saver = new SaveToZipFile(pkg);
    saver.save( System.getProperty("user.dir") + "/sheet10.xlsx");
View Full Code Here

    // Minimal content already present
    SheetData sheetData = sheet.getJaxbElement().getSheetData();
       
    // Now add
    Row row = Context.getsmlObjectFactory().createRow();
    Cell cell = Context.getsmlObjectFactory().createCell();
    cell.setV("1234");
    row.getC().add(cell);
   
   
    row.getC().add(createCell("hello world!"));
   
View Full Code Here

    // See http://openxmldeveloper.org/blog/b/openxmldeveloper/archive/2011/11/22/screen-cast-write-simpler-spreadsheetml-when-generating-spreadsheets.aspx
    // and http://www.docx4java.org/forums/xlsx-java-f15/cells-with-character-values-t874.html
   */
  private static Cell createCell(String content) {

    Cell cell = Context.getsmlObjectFactory().createCell();
   
    CTXstringWhitespace ctx = Context.getsmlObjectFactory().createCTXstringWhitespace();
    ctx.setValue(content);
   
    CTRst ctrst = new CTRst();
    ctrst.setT(ctx);

    cell.setT(STCellType.INLINE_STR);
    cell.setIs(ctrst); // add ctrst as inline string
   
    return cell;
   
  }
View Full Code Here

                Row resultRow = resultRows.get(j);
                Row etalonRow = etalonRows.get(j);
                List<Cell> resultCells = resultRow.getC();
                List<Cell> etalonCells = etalonRow.getC();
                for (int i1 = 0, cSize = etalonCells.size(); i1 < cSize; i1++) {
                    Cell resultCell = resultCells.get(i1);
                    Cell etalonCell = etalonCells.get(i1);
                    if (resultCell.getF() != null) {
                        Assert.assertEquals(etalonCell.getF().getValue(), resultCell.getF().getValue());
                    } else {
                        Assert.assertEquals(etalonCell.getV(), resultCell.getV());
                    }
                }
            }
        }
View Full Code Here

    // Minimal content already present
    SheetData sheetData = sheet.getJaxbElement().getSheetData();
       
    // Now add
    Row row = Context.getsmlObjectFactory().createRow();
    Cell cell = Context.getsmlObjectFactory().createCell();
    cell.setV("1234");
    row.getC().add(cell);
   
   
    row.getC().add(createCell("hello world!"));
   
View Full Code Here

    // See http://openxmldeveloper.org/blog/b/openxmldeveloper/archive/2011/11/22/screen-cast-write-simpler-spreadsheetml-when-generating-spreadsheets.aspx
    // and http://www.docx4java.org/forums/xlsx-java-f15/cells-with-character-values-t874.html
   */
  private static Cell createCell(String content) {

    Cell cell = Context.getsmlObjectFactory().createCell();
   
    CTXstringWhitespace ctx = Context.getsmlObjectFactory().createCTXstringWhitespace();
    ctx.setValue(content);
   
    CTRst ctrst = new CTRst();
    ctrst.setT(ctx);

    cell.setT(STCellType.INLINE_STR);
    cell.setIs(ctrst); // add ctrst as inline string
   
    return cell;
   
  }}
View Full Code Here

         
    row.setHt(66.0);
    row.setCustomHeight(Boolean.TRUE);
    row.setR(1L);
         
    Cell cell1 = Context.getsmlObjectFactory().createCell();
    cell1.setV("1234");
    row.getC().add(cell1);
         
    Cell cell2 = Context.getsmlObjectFactory().createCell();
    cell2.setV("56");
    row.getC().add(cell2);
    sheetData.getRow().add(row);
               
    SaveToZipFile saver = new SaveToZipFile(pkg);
    saver.save( System.getProperty("user.dir") + "/data/xlsx4j/RowHeight-Xlsx4j.xlsx");
View Full Code Here

      // Minimal content already present
      SheetData sheetData = sheet.getContents().getSheetData();
 
      // Now add
      Row row = Context.getsmlObjectFactory().createRow();
      Cell cell = Context.getsmlObjectFactory().createCell();
      cell.setV("1234");
      row.getC().add(cell);
 
 
      row.getC().add(createCell("hello world!"));
      sheetData.getRow().add(row);
View Full Code Here

TOP

Related Classes of org.xlsx4j.sml.Cell

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.