/** * Creates a writable workbook with the given file name * * @param file the file to copy from * @param ws the global workbook settings * @return a writable workbook * @exception IOException */ public static WritableWorkbook createWorkbook(FileInfo file,WorkbookSettings ws) { Stream fos = new FileStream(file.FullName,FileMode.Create); WritableWorkbook w = new WritableWorkbookImpl(fos,true,ws); return w; }
/** * Creates a writable workbook. When the workbook inStream closed, * it will be streamed directly to the output stream. In this * manner, a generated excel spreadsheet can be passed from * a servlet to the browser over HTTP * * @param os the output stream * @param ws the configuration for this workbook * @return the writable workbook * @exception IOException */ public static WritableWorkbook createWorkbook(Stream os, WorkbookSettings ws) { WritableWorkbook w = new WritableWorkbookImpl(os, false, ws); return w; }