code: @Nullable
    public byte [] getAsByteArray ()
    {
      try (final NonBlockingByteArrayOutputStream aBAOS = new NonBlockingByteArrayOutputStream ())
      {
        if (writeTo (aBAOS).isFailure ())
          return null;
        return aBAOS.getBufferOrCopy ();
      }
    }
docs: Helper method to get the whole workbook as a single byte array.
  
  @return <code>null</code> if writing failed. See log files for details.