将普通工作簿转换为SXSSFWorkbook
@param book 工作簿
@return SXSSFWorkbook
@since 4.1.13
555405
private static SXSSFWorkbook toSXSSFBook(Workbook book) {
		if(book instanceof SXSSFWorkbook) {
			return (SXSSFWorkbook) book;
		}
		if(book instanceof XSSFWorkbook) {
			return new SXSSFWorkbook((XSSFWorkbook) book);
		}
		throw new POIException("The input is not a [xlsx] format.");
	}
508067
public static XlsxWorkbook getWorkbook(File file) throws IOException
    {
        try
        {
            return new XlsxWorkbook(file);
        }
        catch(Docx4JException e)
        {
            if(e.getCause() != null
                && e.getCause() instanceof IOException)
                throw (IOException)e.getCause();
            else
                throw new IOException(e);
        }
    }
780554
def save_book(self, f_buf=None):
        
        if f_buf is None:
            f_buf = StringIO.StringIO()
        f_buf.write(openpyxl.writer.excel.save_virtual_workbook(self.book))
        f_buf.seek(0)
        return f_buf
44813
public static function getInstance(PHPExcel $workbook = NULL) {
		if ($workbook !== NULL) {
    		if (isset(self::$_workbookSets[$workbook->getID()])) {
    			return self::$_workbookSets[$workbook->getID()];
    		}
			return new PHPExcel_Calculation($workbook);
		}

		if (!isset(self::$_instance) || (self::$_instance === NULL)) {
			self::$_instance = new PHPExcel_Calculation();
		}

		return self::$_instance;
	}
1129191
function encodeBookWithPage(book, page) {
    var file = page.getFile();

    var result = encodeBook(book);
    result.page = encodePage(page, book.getSummary());
    result.file = encodeFile(file);

    return result;
}
863344
public DSXOrderbookWrapper getDSXOrderbook(String pairs, String type) throws IOException {

    return dsx.getOrderbook(pairs.toLowerCase(), 1, type);
  }
497887
public static <T> Workbook writeWorkBook(Workbook workbook, int count, List<T> beans, List<String> properties,
                                             List<String> titles, String dateFormat) {
        return WriteExcelUtils.writeWorkBook(workbook, 0, count, beans, properties, titles, dateFormat);
    }
884952
public ExcelExtractor getExtractor() {
		ExcelExtractor extractor;
		Workbook wb = this.workbook;
		if (wb instanceof HSSFWorkbook) {
			extractor = new org.apache.poi.hssf.extractor.ExcelExtractor((HSSFWorkbook) wb);
		} else {
			extractor = new XSSFExcelExtractor((XSSFWorkbook) wb);
		}
		return extractor;
	}
883810
def get_book(self):
        
        if self._lookup_session is None:
            mgr = get_provider_manager('COMMENTING', runtime=self._runtime, proxy=self._proxy)
            self._lookup_session = mgr.get_book_lookup_session(proxy=getattr(self, "_proxy", None))
        return self._lookup_session.get_book(Id(self._my_map['id']))
1265502
@Override
  public OrderBook getOrderBook(CurrencyPair currencyPair, Object... args) throws IOException {

    // Request data
    ANXDepthWrapper anxDepthWrapper = null;
    if (args != null && args.length > 0) {
      if (args[0] instanceof String) {
        if ("full" == args[0]) {
          anxDepthWrapper = getANXFullOrderBook(currencyPair);
        } else {
          anxDepthWrapper = getANXPartialOrderBook(currencyPair);
        }
      } else {
        throw new ExchangeException("Orderbook type argument must be a String!");
      }
    } else { // default to full orderbook
      anxDepthWrapper = getANXFullOrderBook(currencyPair);
    }

    // Adapt to XChange DTOs
    List<LimitOrder> asks =
        ANXAdapters.adaptOrders(
            anxDepthWrapper.getAnxDepth().getAsks(),
            currencyPair.base.getCurrencyCode(),
            currencyPair.counter.getCurrencyCode(),
            "ask",
            "");
    List<LimitOrder> bids =
        ANXAdapters.adaptOrders(
            anxDepthWrapper.getAnxDepth().getBids(),
            currencyPair.base.getCurrencyCode(),
            currencyPair.counter.getCurrencyCode(),
            "bid",
            "");
    Date date = new Date(anxDepthWrapper.getAnxDepth().getMicroTime() / 1000);
    return new OrderBook(date, asks, bids);
  }
349086
function findForBook(book) {
    return timing.measure(
        'plugins.findForBook',

        Promise.all([
            findInstalled(locateRootFolder()),
            findInstalled(book.getRoot())
        ])

        // Merge all plugins
        .then(function(results) {
            return Immutable.List(results)
                .reduce(function(out, result) {
                    return out.merge(result);
                }, Immutable.OrderedMap());
        })
    );
}
58161
public static <T> List<T> handleWorkBookToBeans(Class<T> clazz, File file) throws ReadExcelException {
        List<T> beans = null;
        try {
            Workbook workbook = WorkbookFactory.create(file);
            beans = ReadExcelUtils.handleWorkBookToBeans(clazz, workbook);
            if (workbook != null) {
                workbook.close();
            }
        } catch (Exception e) {
            throw new ReadExcelException(e.getMessage());
        }
        return beans;
    }
356258
public static String[] getXlsxWorksheets(File file) 
        throws IOException
    {
        XlsxWorkbook workbook = XlsxWorkbook.getWorkbook(file);
        String[] sheets = workbook.getSheetNames();
        workbook.close();
        return sheets;
    }
107161
@Override
    public boolean endWrite(OutputStream os) {
        boolean flag = true;
        try {
            this.workbook.write(os);
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            CommonUtils.closeIOStream(null, os);
            //删除用于缓存的临时文件
            flag = ((SXSSFWorkbook) this.workbook).dispose();
        }
        return flag;
    }
704958
public static Workbook createWorkbook(FileFormat format, OutputStream os)
        throws IOException
    {
        return createWorkbook(format, os, null);
    }
1185627
public Workbook writeToExcel(List<? extends Object> datas, boolean hasTitle,
                                 Workbook workbook) {
        return writeToExcel(datas, hasTitle, workbook, false);
    }
228452
def << sheet=Workbook::Sheet.new
      sheet = Workbook::Sheet.new(sheet) unless sheet.is_a? Workbook::Sheet
      super(sheet)
      sheet.book=(self)
    end