code: public void to(OutputStream outputStream) throws WriterException {
          if (!withRaw && (null == rows || rows.isEmpty())) {
              throw new WriterException("write rows cannot be empty, please check it");
          }
          if (excelType == ExcelType.XLSX) {
              new WriterWith2007(outputStream).writeSheet(this);
          }
          if (excelType == ExcelType.XLS) {
              new WriterWith2003(outputStream).writeSheet(this);
          }
          if (excelType == ExcelType.CSV) {
              new WriterWithCSV(outputStream).writeSheet(this);
          }
      }
docs: Write an Excel document to the output stream
  
  @param outputStream outputStream
  @throws WriterException