Examples of shiftRows()


Examples of org.apache.poi.hssf.usermodel.HSSFSheet.shiftRows()

        HSSFWorkbook wb = new HSSFWorkbook( fin );
        fin.close();
        HSSFSheet s = wb.getSheetAt( 0 );

        // Shift the second row down 1 and write to temp file
        s.shiftRows( 1, 1, 1 );
        File tempFile = File.createTempFile( "shift", "test.xls" );
        FileOutputStream fout = new FileOutputStream( tempFile );
        wb.write( fout );
        fout.close();
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFSheet.shiftRows()

        assertEquals( s.getRow( 3 ).getPhysicalNumberOfCells(), 4 );
        assertEquals( s.getRow( 4 ).getPhysicalNumberOfCells(), 5 );

        // Shift rows 1-3 down 3 in the current one.  This tests when
        // 1 row is blank.  Write to a another temp file
        s.shiftRows( 0, 2, 3 );
        tempFile = File.createTempFile( "shift", "test.xls" );
        fout = new FileOutputStream( tempFile );
        wb.write( fout );
        fout.close();
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFSheet.shiftRows()

        wb = new HSSFWorkbook( fin );
        fin.close();
        s = wb.getSheetAt( 0 );

        // Shift rows 3 and 4 up and write to temp file
        s.shiftRows( 2, 3, -2 );
        tempFile = File.createTempFile( "shift", "test.xls" );
        fout = new FileOutputStream( tempFile );
        wb.write( fout );
        fout.close();
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFSheet.shiftRows()

    public void testShiftRow(){
  HSSFWorkbook b = new HSSFWorkbook();
  HSSFSheet s    = b.createSheet();
  s.createRow(0).createCell((short)0).setCellValue("TEST1");
  s.createRow(3).createCell((short)0).setCellValue("TEST2");
  s.shiftRows(0,4,1);
    }

    /**
     * Tests when shifting the first row.
     *
 
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFSheet.shiftRows()

    public void testShiftRow0(){
  HSSFWorkbook b = new HSSFWorkbook();
  HSSFSheet s    = b.createSheet();
  s.createRow(0).createCell((short)0).setCellValue("TEST1");
  s.createRow(3).createCell((short)0).setCellValue("TEST2");
  s.shiftRows(0,4,1);
    }
}
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFSheet.shiftRows()

        HSSFWorkbook wb = new HSSFWorkbook( fin );
        fin.close();
        HSSFSheet s = wb.getSheetAt( 0 );

        // Shift the second row down 1 and write to temp file
        s.shiftRows( 1, 1, 1 );
        File tempFile = File.createTempFile( "shift", "test.xls" );
        FileOutputStream fout = new FileOutputStream( tempFile );
        wb.write( fout );
        fout.close();
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFSheet.shiftRows()

        assertEquals( s.getRow( 3 ).getPhysicalNumberOfCells(), 4 );
        assertEquals( s.getRow( 4 ).getPhysicalNumberOfCells(), 5 );

        // Shift rows 1-3 down 3 in the current one.  This tests when
        // 1 row is blank.  Write to a another temp file
        s.shiftRows( 0, 2, 3 );
        tempFile = File.createTempFile( "shift", "test.xls" );
        fout = new FileOutputStream( tempFile );
        wb.write( fout );
        fout.close();
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFSheet.shiftRows()

        wb = new HSSFWorkbook( fin );
        fin.close();
        s = wb.getSheetAt( 0 );

        // Shift rows 3 and 4 up and write to temp file
        s.shiftRows( 2, 3, -2 );
        tempFile = File.createTempFile( "shift", "test.xls" );
        fout = new FileOutputStream( tempFile );
        wb.write( fout );
        fout.close();
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFSheet.shiftRows()

    public void testShiftRow(){
  HSSFWorkbook b = new HSSFWorkbook();
  HSSFSheet s    = b.createSheet();
  s.createRow(0).createCell((short)0).setCellValue("TEST1");
  s.createRow(3).createCell((short)0).setCellValue("TEST2");
  s.shiftRows(0,4,1);
    }
}
View Full Code Here

Examples of org.apache.poi.hssf.usermodel.HSSFSheet.shiftRows()

        HSSFWorkbook wb = new HSSFWorkbook( fin );
        fin.close();
        HSSFSheet s = wb.getSheetAt( 0 );

        // Shift the second row down 1 and write to temp file
        s.shiftRows( 1, 1, 1 );
        File tempFile = TempFile.createTempFile( "shift", "test.xls" );
        FileOutputStream fout = new FileOutputStream( tempFile );
        wb.write( fout );
        fout.close();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.