Source

main / Source / Excel / Excel.BizLogic / Interfaces / IExcelManager.cs

Naethra D ba1cb57 
































































using System.Collections.Generic;

namespace DataUp.Excel.BizLogic
{
    /// <summary>
    /// Interface for managing excel errors.
    /// </summary>
    public interface IExcelManager
    {
        /// <summary>
        /// This function can be used to validate the excel for csv compatibility errors.
        /// </summary>
        /// <returns>List of all csv compatibility errors.</returns>
        IEnumerable<ErrorDetail> Validate();

        /// <summary>
        /// This function can be used to fix all errors in the given workbook.
        /// </summary>
        /// <returns>True, if fix was successful; otherwise false.</returns>
        void FixAll();

        /// <summary>
        /// This function is used to fix the list of errors in the given workbook.
        /// </summary>
        /// <param name="errors">List of errors to be fixed.</param>
        void FixErrors(List<ErrorDetail> errors);

        /// <summary>
        /// This function can be used to fix the error in the given workbook.
        /// </summary>
        /// <param name="error">Error which has to be fixed.</param>
        /// <returns>True, if fix was successful; otherwise false.</returns>
        bool FixError(ErrorDetail error);

        /// <summary>
        /// This function can be used to fix the error in the given worksheet.
        /// </summary>
        /// <param name="typeOfError">Error type.</param>
        /// <param name="sheetName">Name of the sheet.</param>
        void FixErrors(ErrorType typeOfError, string sheetName);

        /// <summary>
        /// This function is used to Select the error in the given workbook.
        /// </summary>
        /// <param name="error">Error which has to be selected.</param>
        void Select(ErrorDetail error);

        /// <summary>
        /// Gets the default document properties.
        /// </summary>
        /// <returns>Default document properties list.</returns>
        Dictionary<string, string> GetDocumentProperties();

        /// <summary>
        /// Gets the workbook name.
        /// </summary>
        /// <returns>Name of the workbook.</returns>
        string GetWorkbookName();

        /// <summary>
        /// Gets list of all sheet names in the current workbook.
        /// </summary>
        /// <returns>List of workbook sheet names.</returns>
        IDictionary<int, string> GetSheetNames();
    }
}