// Create a new workbook Workbook workbook = new Workbook(); ISignature signature = workbook.getSignatures().addNonVisibleSignature(); SignatureDetails details = new SignatureDetails(); details.setAddress1(""); details.setAddress2(""); details.setSignatureComments("Final"); details.setCity(""); details.setStateOrProvince(""); details.setPostalCode(""); details.setCountryName(""); details.setClaimedRole(""); details.setCommitmentTypeDescription("Approved"); details.setCommitmentTypeQualifier("Final"); try { KeyStore ks = KeyStore.getInstance("pkcs12"); String password = ""; char[] passwordChars = password.toCharArray(); String pfxFileKey = ""; InputStream pfxStrm = getResourceStream(pfxFileKey); try { ks.load(pfxStrm, passwordChars); } catch (NoSuchAlgorithmException e) { throw new RuntimeException(e); } catch (CertificateException e) { throw new RuntimeException(e); } catch (IOException e) { throw new RuntimeException(e); } signature.sign(ks, password, details); // Commit signature workbook.save("SignWorkbook.xlsx"); } catch (KeyStoreException e) { throw new RuntimeException(e); }