Package org.zkoss.zss.model

Examples of org.zkoss.zss.model.Sheet.deleteColumns()


    Book book = new ExcelImporter().imports(getClass().getResource("/"+nm));
    final SimpleSSDataListener ssl = new SimpleSSDataListener();
    book.addSSDataListener(ssl);

    Sheet sheet1 = (Sheet) book.getSheets().get(0);
    sheet1.deleteColumns(2,2); //delete column C (C1 ~ C100)

    List evts = ssl.getList();
   
    for(Iterator it = evts.iterator(); it.hasNext();) {
      final SSDataEvent ev = (SSDataEvent) it.next();
View Full Code Here


    final String nm = "row200.xls";
    Book book = new ExcelImporter().imports(getClass().getResource("/"+nm));
   
    Sheet sheet1 = (Sheet) book.getSheets().get(0);
    try {
      sheet1.deleteColumns(-1, -1);
      assertFalse("Should come here after sheet1.deleteColumns(-1, -1);",true);
    } catch(Exception ex) {
      System.out.println(ex.getMessage());//correct and ignore
    }
  }
View Full Code Here

    Sheet sheet1 = (Sheet) book.getSheets().get(0);
    int widthA = sheet1.getColumnWidth(0);
    int widthB = sheet1.getColumnWidth(1);
    int widthC = sheet1.getColumnWidth(2);
   
    sheet1.deleteColumns(1,1);
   
    assertEquals(widthA, sheet1.getColumnWidth(0));
    assertTrue(widthB != sheet1.getColumnWidth(1));
    assertEquals(widthC, sheet1.getColumnWidth(1));
  }
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.