There are various options for setting permissions in Excel (referred attached screenshot from 2010), including password protection of a single sheet or entire workbook.
If you choose "Encrypt with Password", you'll get an xlsx file which is not a normal zip file, but rather, an OLE compound file.
It'll include an EncryptionInfo stream, with root element encryption in namespace http://schemas.microsoft.com/office/2006/encryption
* [MS-OFFCRYPTO] http://msdn.microsoft.com/en-us/library/cc313071.aspx
By the way, POI can apparently read such a file:- http://poi.apache.org/encryption.html
but I don't know whether it can write one. In any case that code could be a useful place to start.