Hello i wrote this code to add a Date in excel but when the cell is added he show also the time. I want eliminated the time part. Thank you in advance if someone can help ..
Tabla[tabReg][tabCol]); is String Array
SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
Date convertedDate = dateFormat.parse(Tabla[tabReg][tabCol]);
DateFormat df = new DateFormat("yyyy/MM/dd");
WritableCellFormat wdf = new WritableCellFormat(df);
cf = new WritableCellFormat(df);
cell = new jxl.write.DateTime(exCol,exReg, convertedDate);
cell.setCellFormat(wdf);
sheet2.addCell(cell);
The solution was to put the format when you create de cell.