Build 4.0.0.14 of xlsgen improves how password-protected XLSX files are reported as such when a client application tries to open them without the appropriate password.
Before the build, E_FAIL (i.e. 80040005) would be returned. In fact since mid 2015 it has been like this as a result of the handling of auto-encrypted files.
Beginning with this build, HRESULT_ERROR_PASSWORDPROTECTED is returned (i.e. 0x80072001)