Пример #1
0
 public String toString() {
   StringBuffer sb = new StringBuffer(64);
   sb.append(getClass().getName());
   sb.append(" [");
   if (_bookName != null) {
     sb.append(" [").append(_sheetIdentifier.getName()).append("]");
   }
   if (_sheetIdentifier.isQuoted()) {
     sb.append("'").append(_sheetIdentifier.getName()).append("'");
   } else {
     sb.append(_sheetIdentifier.getName());
   }
   sb.append("]");
   return sb.toString();
 }
Пример #2
0
 public SheetIdentifier(
     String bookName, Identifier sheetIdentifier, FormulaParsingWorkbook book) {
   if (bookName == null && sheetIdentifier.isQuoted()) { // might be '[Book.xls]Sheet 1'!
     final String name = sheetIdentifier.getName();
     if (name.charAt(0) == '[') {
       int j = name.indexOf(']');
       if (j > 1) {
         bookName = name.substring(1, j);
         sheetIdentifier = new Identifier(name.substring(j + 1), true);
       }
     }
   }
   if (bookName != null) {
     bookName = book.getBookNameFromExternalLinkIndex(bookName);
   }
   _bookName = bookName;
   _sheetIdentifier = sheetIdentifier;
 }