I'm using the following code. Only fields not filled in with data from the first line have the style from the second line.
'Adds data to the worksheet
Report.Cells.ImportDataTable(dt, False, "A5")
'Sets style for column 4
Report.Cells.Columns(4).Style.Number = 14
I cannot set the style with the xls template for other reasons so I just wanted to make column 4 display with the date cell format. Rows 0-4 , column 4 are empty but end up with the correct style (number 14). However, the cells (rows 5-x) in the column filled in by the ImportDataTable do not have the style. Any ideas why this is happening?