Esempio n. 1
0
        /// <summary>
        /// Saves the workbook with the defined name asynchronous.
        /// </summary>
        /// <param name="fileName">fileName of the saved workbook</param>
        /// <returns>Task object (void)</returns>
        /// <exception cref="Exceptions.IOException">May throw an 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 SaveAsAsync(string fileName)
        {
            string backup = fileName;

            filename = fileName;
            XlsxWriter l = new XlsxWriter(this);
            await l.SaveAsync();

            filename = backup;
        }
Esempio n. 2
0
 /// <summary>
 /// Saves the workbook asynchronous.
 /// </summary>
 /// <returns>Task object (void)</returns>
 /// <exception cref="Exceptions.IOException">May throw an 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 SaveAsync()
 {
     XlsxWriter l = new XlsxWriter(this);
     await l.SaveAsync();
 }