I load data into excel from a datatable using a method LoadFromDataTable, and then change the cell format to an integer until it shows an error . The number in this cell is formatted as text or precedes an apostrophe .
Cellshowed only the right side and number format only for the cell property.
Still I don’t understand why I am getting this error ??.
Dim wsManufacturing As ExcelWorksheet = pck.Workbook.Worksheets.Add("Manufacturing")
wsManufacturing.Cells("A1").LoadFromDataTable(dtManufacturing, True)
Using col As ExcelRange = wsManufacturing.Cells(2, 2, 2 + dtManufacturing.Rows.Count, 2)
col.Style.Numberformat.Format = "#,##0"
col.Style.HorizontalAlignment = ExcelHorizontalAlignment.Right
End Using

source
share