79587473

Date: 2025-04-22 21:38:38
Score: 1.5
Natty:
Report link

Can apply this to specific columns by checking the column index

foreach (TableCell cell in e.Row.Cells)
{
    if (e.Row.Cells.GetCellIndex(cell) == 0 || e.Row.Cells.GetCellIndex(cell) == 1)           //eg: ID (0) and Phone (1)
    {
        cell.Style.Add("mso-number-format", "\\@");
    }
}

-- Should resolve the issue by applying the formatting only to the selected columns
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Starts with a question (0.5): Can
  • Low reputation (1):
Posted by: Watson Matunhire