79823250

Date: 2025-11-18 10:37:04
Score: 8.5 🚩
Natty:
Report link

I have a similar problem.

I have a large file (over 10 MB) which I need to read, and then insert a new sheet with data to the same file.

This is what I am doing
I have to read and write to the same file.

OPCPackage pkg = OPCPackage.open(stringFileName);
            xwb = new XSSFWorkbook(pkg);//this is error line
            tempsxwb = new SXSSFWorkbook(auctionSPFileXWB, 100, true, false);

I need the XssfWorkbook obj to read data from the file and then after working on that data I have to write a new sheet to the same file. 


try(FileOutputStream fos = new FileOutputStream(stringFileName)){
                tempsxwb.write(fos);
                fos.flush();
                }
tempsxwb.close();

can anybody suggest a solution?
Reasons:
  • Blacklisted phrase (1): I have a similar problem
  • Blacklisted phrase (0.5): I need
  • RegEx Blacklisted phrase (2.5): can anybody suggest a solution
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Me too answer (2.5): I have a similar problem
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: swapnil