Hello,
i'm using ImportDataGridView to write a DataGridView to xlsx.
using (ExcelEngine excelEngine = new ExcelEngine())
{
//Initialize Application
IApplication application = excelEngine.Excel;
//Set default version for application
application.DefaultVersion = ExcelVersion.Excel2013;
//Create a new workbook
IWorkbook workbook = application.Workbooks.Create(1);
//Accessing first worksheet in the workbook
IWorksheet worksheet = workbook.Worksheets[0];
//Import data from DataGridView control
worksheet.ImportDataGridView(dataGridView, 1, 1, true, true);
//Save the workbook
workbook.SaveAs(sfd.FileName);
}
All columns are type of string.
How can I prevent conversion to date?
Best Regards
Christoph