Hi,
We evaluate a column's datatype based on the first value in the field. You can get an error if there are mixed value types in the column(s) e.g., first value is integer and third value is alpha-numeric.
I think you may try to create a datatable and add your desired data types for the columns. You may try our latest version(4.6.0.x) which has Cells.ExportDataTable(DataTable dataTable,int firstRow, int firstColumn, int rowNumber, bool exportColumnName) method to export the data table.
e.g..,
Workbook workbook = new Workbook();
// ....................
Cells cells = workbook.Worksheets[0].Cells;
//Create a datatable and add columns to it.
//NOTE: If there are mixed value types, please always use String data types for those columns.
DataTable dt = new DataTable();
dt.Columns.Add("column1", typeof(string));
dt.Columns.Add("column2", typeof(string));
dt.Columns.Add("column3", typeof(string));
dt.Columns.Add("column4", typeof(double));
dt.Columns.Add("column5", typeof(double));
dt.Columns.Add("column6", typeof(double));
dt.Columns.Add("column7", typeof(double));
//.............
cells.ExportDataTable(dt, 0, 0, 232, true);
workbook.Worksheets.Add("NewSheet");
workbook.Worksheets["NewSheet"].Cells.ImportDataTable(dt, true, "A1");
workbook.Save("f:\\test\\outMyBook.xls");
Thank you.