Come da titolo, come faccio a inserire una data che mi arriva in parametro da linea di comando(quindi string) in una cella di un foglio excel che è di tipo data?
codice:
try{
POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(xlModelPath));
//xlOut=new FileOutputStream(xlModelPath);
HSSFWorkbook wb = new HSSFWorkbook(fs);
HSSFSheet sheet = wb.getSheetAt(0);
HSSFRow row = sheet.getRow(0);
HSSFCell cell = row.getCell((short)14);
// cell.setCellValue((DateFormat.getInstance()).parse(firstDatePianoDpForn));
cell.setCellValue(???);
/*wb.write(xlOut);
xlOut.close();*/
cell=null;
row=null;
sheet=null;
wb=null;
fs=null;
xlOut=null;
}catch(Exception e){
System.out.println("Errore I/O modifica file modello xls:"+e);
return;
}