/// <summary> /// Get cell content in Type T /// </summary> /// <typeparam name="T"></typeparam> /// <param name="cell">XLCell instance <see cref="IXLCell"/></param> /// <param name="conversor">Func convert types</param> /// <param name="valueIfNull"> Default value return to empty cells</param> /// <returns></returns> public static T GetContentTyped <T>(this IXLCell cell, Func <string, T> conversor, T valueIfNull = default(T)) { string valor = cell.GetContentWithOutSpaces(null); if (string.IsNullOrEmpty(valor)) { return(default(T)); } return(conversor(valor)); }