While exporting from Datatble to excel ..even though the generated spreadsheet contains numbers as right -aligned the category in Format cells is set to "General" and not "Numbers".
I have checked the datatable columns datatype and changed the datatype of cells accordingly.
e.g
if (col.Value == "Int32")
{
cell.DataType = CellValues.Number;
cell.CellValue = new CellValue(rowtext);
}
I formatted the Date cells using custom format by adding stylesheet and setting NumberFromatId and FormatCode. Now in the generated sheet category in Format cells is set to "Custom" and not "General".
Then why doesnt it change for numbers??
I have checked the datatable columns datatype and changed the datatype of cells accordingly.
e.g
if (col.Value == "Int32")
{
cell.DataType = CellValues.Number;
cell.CellValue = new CellValue(rowtext);
}
I formatted the Date cells using custom format by adding stylesheet and setting NumberFromatId and FormatCode. Now in the generated sheet category in Format cells is set to "Custom" and not "General".
Then why doesnt it change for numbers??