Package org.apache.poi.hssf.model

Examples of org.apache.poi.hssf.model.Sheet


       
        // convert all LabelRecord records to LabelSSTRecord
        convertLabelRecords(records, recOffset);       
        while (recOffset < records.size())
        {
            Sheet sheet = Sheet.createSheet(records, sheetNum++, recOffset );

            recOffset = sheet.getEofLoc()+1;
            if (recOffset == 1)
            {
                break;
            }
View Full Code Here


              switch (bof.getType()) {
               case BOFRecord.TYPE_WORKBOOK:
                 currentmodel = new Workbook();                
               break;
               case BOFRecord.TYPE_WORKSHEET:
                 currentmodel = new Sheet();                                 
               break;
              default:
                   throw new RuntimeException("Unsupported model type "+bof.getType());
              }               
              
View Full Code Here

    public void testBackupRecord()
            throws Exception
    {
        HSSFWorkbook wb = new HSSFWorkbook();
        HSSFSheet s = wb.createSheet();
        Sheet sheet = s.getSheet();

        assertEquals(true, sheet.getGridsetRecord().getGridset());
        s.setGridsPrinted(true);
        assertEquals(false, sheet.getGridsetRecord().getGridset());
    }
View Full Code Here

    public void testVerticallyCenter()
            throws Exception
    {
        HSSFWorkbook wb = new HSSFWorkbook();
        HSSFSheet s = wb.createSheet();
        Sheet sheet = s.getSheet();
        VCenterRecord record =
                (VCenterRecord) sheet.findFirstRecordBySid(VCenterRecord.sid);

        assertEquals(false, record.getVCenter());
        s.setVerticallyCenter(true);
        assertEquals(true, record.getVCenter());
View Full Code Here

    public void testHorizontallyCenter()
            throws Exception
    {
        HSSFWorkbook wb = new HSSFWorkbook();
        HSSFSheet s = wb.createSheet();
        Sheet sheet = s.getSheet();
        HCenterRecord record =
                (HCenterRecord) sheet.findFirstRecordBySid(HCenterRecord.sid);

        assertEquals(false, record.getHCenter());
        s.setHorizontallyCenter(true);
        assertEquals(true, record.getHCenter());
View Full Code Here

    public void testWSBool()
    {
        HSSFWorkbook wb = new HSSFWorkbook();
        HSSFSheet s = wb.createSheet();
        Sheet sheet = s.getSheet();
        WSBoolRecord record =
                (WSBoolRecord) sheet.findFirstRecordBySid(WSBoolRecord.sid);

        // Check defaults
        assertEquals(true, record.getAlternateExpression());
        assertEquals(true, record.getAlternateFormula());
        assertEquals(false, record.getAutobreaks());
View Full Code Here

        // convert all LabelRecord records to LabelSSTRecord
        convertLabelRecords(records, recOffset);
        while (recOffset < records.size())
        {
            Sheet sheet = Sheet.createSheet(records, sheetNum++, recOffset );

            recOffset = sheet.getEofLoc()+1;
            if (recOffset == 1)
            {
                break;
            }
View Full Code Here

   * Test the gridset field gets set as expected.
   */
  public void testBackupRecord() {
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet s = wb.createSheet();
    Sheet sheet = s.getSheet();

    assertEquals(true, sheet.getGridsetRecord().getGridset());
    s.setGridsPrinted(true);
    assertEquals(false, sheet.getGridsetRecord().getGridset());
  }
View Full Code Here

   * Test vertically centered output.
   */
  public void testVerticallyCenter() {
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet s = wb.createSheet();
    Sheet sheet = s.getSheet();
    VCenterRecord record =
        (VCenterRecord) sheet.findFirstRecordBySid(VCenterRecord.sid);

    assertEquals(false, record.getVCenter());
    s.setVerticallyCenter(true);
    assertEquals(true, record.getVCenter());

View Full Code Here

   * Test horizontally centered output.
   */
  public void testHorizontallyCenter() {
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet s = wb.createSheet();
    Sheet sheet = s.getSheet();
    HCenterRecord record =
        (HCenterRecord) sheet.findFirstRecordBySid(HCenterRecord.sid);

    assertEquals(false, record.getHCenter());
    s.setHorizontallyCenter(true);
    assertEquals(true, record.getHCenter());
  }
View Full Code Here

TOP

Related Classes of org.apache.poi.hssf.model.Sheet

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.