Example #1
0
        /// <summary>
        /// Sets the first content of the match cell.
        /// </summary>
        /// <param name="sheet">The sheet.</param>
        /// <param name="matchedContent">Content of the matched.</param>
        /// <param name="newContent">The new content.</param>
        public static void SetFirstMatchCellContent(this ISheet sheet, string matchedContent, string newContent)
        {
            var location = sheet.FindCellLocation(matchedContent);

            if (location.HasValue)
            {
                sheet.SetCellContent(location.Value, newContent);
            }
        }
Example #2
0
        /// <summary>
        /// Removes the first match row.
        /// </summary>
        /// <param name="sheet">The sheet.</param>
        /// <param name="matchedContent">Content of the matched.</param>
        public static void RemoveFirstMatchRow(this ISheet sheet, string matchedContent)
        {
            var location = sheet.FindCellLocation(matchedContent);

            if (location.HasValue)
            {
                sheet.RemoveRow(sheet.GetRow(location.Value.Y));
            }
        }