There is a DataTable and there is a loop
foreach (DataRow row in table.Rows) { int a = 0; int b = 0; int.TryParse(row["a"].ToString(), out a); int.TryParse(row["b"].ToString(),out b); row["a"] = sign + signfk; } row["a"] type int
Accordingly, it turns out that the column is of type int and integer values are stored in it.
Is it possible to make it so that when row["a"] = 0 , it was possible to convert the cell to string and set the value for row["a"] = "н/a" .
I understand that it is possible to work with lists and it will be easier. But since there are many actions with one table, there is no point in changing already.
The report is output from the source table in Excel.
intcolumn is written to it, thestringwill fail. - MaximK