I am using jakartaPOI to create an excel file in my GWT application as it doesnt allow me to write the code on client side , So i have the code of writing excel file in my server side .
This creates an excel file correctly on server machine What I want is to create the same excel file on the client/user machine.
Is there a solution for this
Thanks
Code:
try {
FileOutputStream fileOut = new FileOutputStream("D:\\POI111.xls");
HSSFWorkbook workbook = new HSSFWorkbook();
HSSFSheet worksheet = workbook.createSheet("POI Worksheet");
// index from 0,0... cell A1 is cell(0,0)
HSSFRow row1 = worksheet.createRow((short) 0);
HSSFCell cellA1 = row1.createCell((short) 0);
cellA1.setCellValue(dto.getColumn1());
workbook.write(fileOut);
fileOut.flush();
fileOut.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return "exported";
}