示例#1
0
 /**
  * @param book
  * @param startRow
  * @param startCol
  * @param endRow
  * @param endCol
  * @return
  */
 public static String coor2Formula(
     JBook book, int startRow, int startCol, int endRow, int endCol) {
   String T1 = null, T2 = null, Text = null;
   try {
     T1 = book.formatRCNr(startRow, startCol, false);
     if (startRow == endRow && startCol == endCol) {
       Text = T1;
     } else {
       T2 = book.formatRCNr(endRow, endCol, false);
       Text = T1 + ":" + T2;
     }
   } catch (Exception e) {
     e.printStackTrace();
   }
   return Text;
 }