I want to write in an existing excel(in sheet1) file in a perticular cell(say row=1,cell=6). I'm using poi jar. But I could not write in that perticular cell.
String val= //value that I want to write;
The FIS is used to create the HSSFWorkbook object.
I dont believe that changing cell values within the workbook object directly affects the FIS.
In my experiances with POI I have used xls files as a template but never had to ammend an existing file.
Perhaps close the current stream and write over the original file. I'm sure there is a more efficent way.
May I reccomend you use
Assuming sheet 1 is the first sheet in your workbook. You never know if you'll want to give the xls file a meaning full name and this will avoid you having to redeploy code.
Joined: Dec 14, 2010
Thanks Joshua for pointing out the general way of pointing a sheetname.
Though this does not serve my requirement. If I go with your way, then the original file will be updated rather than getting updated. I just want to add one cell value rather than rewriting the file. So this is like append rather than overwrite