posted 6 years ago
I might make as many copies of the file as there are sheets, each named "filename-N.xls", with 1<=N<=number of sheets. (Obviously, you'd have to open the file first to find out how many sheets it has, and then make copies as needed. The org.apache.poi.ss.usermodel.Workbook class has a getNumberOfSheets method.). Then I'd loop through all files, and delete all sheets that are not sheet N from each one.