static void CreateExcelFromDataTable(DataTable dtExcel, string spName)
{
XLWorkbook wb = new XLWorkbook();
wb.Worksheets.Add(dtExcel, "dtExcel");
string fileName = "ExcelFiles/" + spName + "_" + DateTime.Now.ToString("MM.dd.yyyy") + ".xlsx";
wb.SaveAs(fileName.Replace("usp_", ""));
}
This works but for a particular column I need it to be formatted as 'number' when converted .. Any ideas ? ↧
New Post: Any easy way to format a particular column to be 'number' instead of 'text' when converting a dataset into xls ?
↧