I am using an Excel Template file in VB.Net to create a spreadsheet populated from a dataset. The template file has one column that is formatted as Number. Looping through the dataset, I insert the current data into the cell formatting the value as and set the datatype of the cell to Number as shown below.
cell.CellValue =
New CellValue(String.Format("{0:f}", value))
cell.DataType = New EnumValue(Of CellValues)(CellValues.Number)
Beginning with the fifth row in the resulting spreadsheet, the format of the rest of the cells in that column are formatted as General instead of Number.
Any ideas on why this would be happening?