How to append poi excel files?
Hi All,
I am using POI excel files and this is my code to create an excel sheet.
for(i=0;i<i><files.length();i++)
{
String excel=excelFiles[i]
Date date=new Date();
int rowCount= 45;
Sample samp=new Sample();
samp.createWorkbookForLogReport(excel,date,rowCount);
}
private HSSFWorkbook createWorkbookForLogReport(String excel,Date date,int rowCount)throws IOException{
HSSFWorkbook wb =new HSSFWorkbook();
HSSFSheet sheet = wb.createSheet("new sheet");
int idx = 0;// rows index
HSSFRow row = sheet.createRow((short)idx);
idx++;
String[] attributessss =
{"ExcelName","Date and Time","RowCount"};
for (int j = 0; j >< attributessss.length; j++){
attribute = attributessss[j];
row.createCell((short)j).setCellValue((String)attribute);
}
row = sheet.createRow((short)idx);
row.createCell((short)0).setCellValue((String)excelFiles);
row.createCell((short)1).setCellValue(date);
row.createCell((short)2).setCellValue(rowCount);
idx++;
return wb;
}
the parametres are continuously changing i am able to write once in the excel file.but couldnt able to append the same excel file.is there any possibility to append the single excel filefor changing records.

