Package org.zkoss.poi.ss.util

Examples of org.zkoss.poi.ss.util.CellReference.formatAsString()


                  CTCommentList lst = sheetComments.getCTComments().getCommentList();
                  for (CTComment comment : lst.getCommentArray()) {
                      CellReference ref = new CellReference(comment.getRef());
                      if(ref.getRow() == rownum){
                          ref = new CellReference(rownum + n, ref.getCol());
                          comment.setRef(ref.formatAsString());
                      }
                  }
              }
            }
        }
View Full Code Here


                  for (CTComment comment : lst.getCommentArray()) {
                      CellReference ref = new CellReference(comment.getRef());
                      final int colnum = ref.getCol();
                      if(ref.getRow() == rownum && lCol <= colnum && colnum <= rCol){
                          ref = new CellReference(rownum + n, colnum);
                          comment.setRef(ref.formatAsString());
                      }
                  }
              }
            }
        }
View Full Code Here

                      int newColNum = colnum + n;
                      if (newColNum < 0 || newColNum > maxcol) { //out of bound, shall remove it
                        it.remove();
                      } else {
                          ref = new CellReference(ref.getRow(), newColNum);
                          comment.setRef(ref.formatAsString());
                      }
                    }
                }
            }
        }
View Full Code Here

                      int newColNum = colnum + n;
                      if (newColNum < 0 || newColNum > maxcol) { //out of bound, shall remove it
                        it.remove();
                      } else {
                          ref = new CellReference(ref.getRow(), newColNum);
                          comment.setRef(ref.formatAsString());
                      }
                    }
                }
            }
        }
View Full Code Here

                      if (newColNum < 0 || newColNum > maxcol
                        || newRowNum < 0 || newRowNum > maxrow) { //out of bound, shall remove it
                        it.remove();
                      } else {
                          ref = new CellReference(newRowNum, newColNum);
                          comment.setRef(ref.formatAsString());
                      }
                    }
                }
            }
        }
View Full Code Here

        CellReference cellRefTo = new CellReference(cra.getLastRow(), cra.getLastColumn(),true,true);
        sb.append(cellRefFrom.formatAsString());
        //for a single-cell reference return A1 instead of A1:A1
        if(!cellRefFrom.equals(cellRefTo)){
            sb.append(':');
            sb.append(cellRefTo.formatAsString());
        }
        return sb.toString();
  }

  //20110512, peterkuo@potix.com
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.