private static void VisitTableCell(HtmlTag cell, ExportRow exportRow) { var tag = cell.TagName().ToLower(); if (tag != HtmlTagConstants.Td && tag != HtmlTagConstants.Th ) { cell.Children.ForEach(c => VisitTableCell(c, exportRow)); return; } var isImage = cell.Children.Any(c => c.TagName().ToLower() == HtmlTagConstants.Img); var text = cell.Children.Any() ? cell.ToString() : cell.Text(); var exportCell = new ExportCell { Text = ExportFromTable.HtmlTagRegex.Replace(text ?? string.Empty, string.Empty), Markup = isImage ? cell.FirstChild().ToString():string.Empty }; SetColspan(cell, exportCell); exportRow.AddCell(exportCell); }