Xlsx and Xlsm files are zip files. You could try using Java ZipFile or ZipInputStream to read the file. Most of the files in the zip are XML files. You could filter out the file that has the sheet data for the sheet that you want to delete.
It's quite likely that some of the other XML files will have references to the sheet you are trying to remove. You may get away with leaving some of these references behind but some might cause issues. Greg has suggested that you take a sample xlsm file and modify it in Excel to remove the sheet and save that as a new file. You can unzip the original and new files and diff them to see what you you will need to automate. -- Sent from: http://apache-poi.1045710.n5.nabble.com/POI-User-f2280730.html --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
