Package org.zkoss.poi.ss.usermodel

Examples of org.zkoss.poi.ss.usermodel.Name


  public static Range range(Worksheet sheet, String reference) {
    AreaReference ref = getAreaReference(sheet, reference);
    if (ref == null) {
      //try NamedRange
      final Workbook wb = sheet.getWorkbook();
        final Name range = wb.getName(reference);
        if (range != null) {
          ref = getAreaReference(sheet, range.getRefersToFormula());
        } else {
          throw new IllegalArgumentException("Cannot find the named range '" + reference + "'");
        }
    }
    if (ref == null)
View Full Code Here


    int bottom = spreadsheet.getSelection().getBottom();
    Textbox fsaw_filename = (Textbox) Path
        .getComponent("//p1/rangeAddWin/raw_rangename");
    String name = fsaw_filename.getValue();

    Name namevar = book.createName();
    namevar.setNameName(name);
    namevar.setSheetIndex(sheetindex);
    CellRangeAddress cra = new CellRangeAddress(top, bottom, left, right);
    namevar.setRefersToFormula(cra.formatAsString());
   
    Window rangeAddWin = (Window) Path.getComponent("//p1/rangeAddWin");
    rangeAddWin.detach();
  }
View Full Code Here

    try {
      Listbox rcw_rangeList = (Listbox) Path
          .getComponent("//p1/rangeChooseWin/rcw_rangeList");

      Listitem st = rcw_rangeList.getSelectedItem();
      Name range;
      Rect rect;
      if (st != null) {
        String rangeName = st.getLabel();
        range = book.getName(rangeName);
        CellRangeAddress cra = CellRangeAddress.valueOf(range.getRefersToFormula());
        rect = new Rect(cra.getFirstColumn(), cra.getFirstRow(),
            cra.getLastColumn(), cra.getLastRow());
        spreadsheet.setSelection(rect);
      }
View Full Code Here

      } else {
        return;
      }
     
      Listitem st = rangeList.getSelectedItem();
      Name range;
      Rect rect;
      if (st != null) {
        String rangeName = st.getLabel();
        range = book.getName(rangeName);
        CellRangeAddress cra = CellRangeAddress.valueOf(range.getRefersToFormula());
        rect = new Rect(cra.getFirstColumn(), cra.getFirstRow(),
            cra.getLastColumn(), cra.getLastRow());
        spreadsheet.setHighlight(rect);
      }
View Full Code Here

TOP

Related Classes of org.zkoss.poi.ss.usermodel.Name

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.