/// <summary> /// Save the workbook to a writable stream asynchronous. /// </summary> /// <param name="stream">>Writable stream</param> /// <param name="leaveOpen">Optional parameter to keep the stream open after writing (used for MemoryStreams; default is false)</param> /// <returns>Task object (void)</returns> /// <exception cref="IOException">Throws IOException in case of an error. The asynchronous operation may hide the exception.</exception> /// <exception cref="RangeException">May throw a RangeException if the start or end address of a handled cell range was out of range. The asynchronous operation may hide the exception.</exception> /// <exception cref="FormatException">May throw a FormatException if a handled date cannot be translated to (Excel internal) OADate. The asynchronous operation may hide the exception.</exception> /// <exception cref="StyleException">May throw a StyleException if one of the styles of the workbook cannot be referenced or is null. The asynchronous operation may hide the exception.</exception> public async Task SaveAsStreamAsync(Stream stream, bool leaveOpen = false) { XlsxWriter l = new XlsxWriter(this); await l.SaveAsStreamAsync(stream, leaveOpen); }
/// <summary> /// Save the workbook to a writable stream asynchronous. /// </summary> /// <param name="stream">>Writable stream</param> /// <returns>Task object (void)</returns> /// <exception cref="Exceptions.IOException">Throws IOException in case of an error. The asynchronous operation may hide the exception.</exception> /// <exception cref="RangeException">May throw a RangeException if the start or end address of a handled cell range was out of range. The asynchronous operation may hide the exception.</exception> /// <exception cref="Exceptions.FormatException">May throw a FormatException if a handled date cannot be translated to (Excel internal) OADate. The asynchronous operation may hide the exception.</exception> /// <exception cref="StyleException">May throw a StyleException if one of the styles of the workbook cannot be referenced or is null. The asynchronous operation may hide the exception.</exception> public async Task SaveAsStreamAsync(Stream stream) { XlsxWriter l = new XlsxWriter(this); await l.SaveAsStreamAsync(stream); }