@ Nonnull public ESuccess writeTo ( @ Nonnull @ WillClose final OutputStream aOS ) { try { ValueEnforcer . notNull ( aOS , "OutputStream" ) ; if ( m_nCreatedCellStyles > 0 && LOGGER . isDebugEnabled ( ) ) LOGGER . debug ( "Writing Excel workbook with " + m_nCreatedCellStyles + " different cell styles" ) ; m_aWB . write ( aOS ) ; return ESuccess . SUCCESS ; } catch ( final IOException ex ) { if ( ! StreamHelper . isKnownEOFException ( ex ) ) LOGGER . error ( "Failed to write Excel workbook to output stream " + aOS , ex ) ; return ESuccess . FAILURE ; } finally { StreamHelper . close ( aOS ) ; } }
Write the current workbook to an output stream .