Пример #1
0
        /// <summary>
        /// Save the workbook to a writable stream
        /// </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>
        /// <exception cref="IOException">Throws IOException in case of an error</exception>
        /// <exception cref="RangeException">Throws a RangeException if the start or end address of a handled cell range was out of range</exception>
        /// <exception cref="FormatException">Throws a FormatException if a handled date cannot be translated to (Excel internal) OADate</exception>
        /// <exception cref="StyleException">Throws a StyleException if one of the styles of the workbook cannot be referenced or is null</exception>
        public void SaveAsStream(Stream stream, bool leaveOpen = false)
        {
            XlsxWriter l = new XlsxWriter(this);

            l.SaveAsStream(stream, leaveOpen);
        }
Пример #2
0
        /// <summary>
        /// Save the workbook to a writable stream
        /// </summary>
        /// <param name="stream">Writable stream</param>
        /// <exception cref="Exceptions.IOException">Throws IOException in case of an error</exception>
        /// <exception cref="RangeException">Throws an RangeException if the start or end address of a handled cell range was out of range</exception>
        /// <exception cref="Exceptions.FormatException">Throws a FormatException if a handled date cannot be translated to (Excel internal) OADate</exception>
        /// <exception cref="StyleException">Throws an StyleException if one of the styles of the workbook cannot be referenced or is null</exception>
        public void SaveAsStream(Stream stream)
        {
            XlsxWriter l = new XlsxWriter(this);

            l.SaveAsStream(stream);
        }