/// <summary>
 /// 获取错误消息
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="output"></param>
 /// <returns></returns>
 public static string GetErrorMessage <T>(this ExcelSheetDataOutput <T> output) where T : class, new()
 {
     if (output == null || output.InvalidCount <= 0)
     {
         return(null);
     }
     return($"工作表【{output.SheetName}】数据错误:\r\n{string.Join(" ", output.Rows.Select(a => a.GetErrorMessage()).Where(a => a != null))}\r\n");
 }
        /// <summary>
        /// 检查错误并抛出异常
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="output"></param>
        /// <returns></returns>
        public static void CheckError <T>(this ExcelSheetDataOutput <T> output) where T : class, new()
        {
            if (output == null)
            {
                return;
            }

            if (output.InvalidCount > 0)
            {
                throw new Exception(output.GetErrorMessage());
            }
        }
 /// <summary>
 /// 获取所有数据
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="output"></param>
 /// <returns></returns>
 public static IEnumerable <T> GetAllData <T>(this ExcelSheetDataOutput <T> output) where T : class, new()
 {
     return(output?.GetData(null));
 }
 /// <summary>
 /// 获取无效数据
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="output"></param>
 /// <param name="isValid">是否有效,null全部</param>
 /// <returns></returns>
 private static IEnumerable <T> GetData <T>(this ExcelSheetDataOutput <T> output, bool?isValid) where T : class, new()
 {
     return(output?.Rows?.GetData(isValid));
 }
 /// <summary>
 /// 获取有效数据
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="output"></param>
 /// <returns></returns>
 public static IEnumerable <T> GetValidData <T>(this ExcelSheetDataOutput <T> output) where T : class, new()
 {
     return(output?.GetData(true));
 }