We are using JExcelApi for generating Excel output. It works perfectly allright. But, when used on a floppy its giving 'Insufficient Disk Space' which is true.
Now we are in the catch block, we just need one thing - TO DELETE THAT INCOMPLETE FILE.
We tried the following
1. Tried to delete the file from that function itself - FAILED - The file is still being referred
2. Tried to close and then delete - FAILED - But close again is throwing the same exception.
3. Tried to delete the file after the function - Insense from where we called this 'exportExcel()' function - FAILED - The file is still being referred.
Please suggest us how to close the file reference and delete that file. Anyway it wont be good to leave an incomplete file on the disk - Right???