I have a Java product that can export Excel files. Some of them contain macros. And the client wants them to be certified with a given pfx file
I have the .pfx file given by the client.
I can, of course, supply an excel macros with the certificate by hand. But the aim is to make the code (java) to do it automatically.
Apache poi has docs (https://poi.apache.org/apidocs/dev/org/apache/poi/poifs/crypt/dsig/SignatureInfo.html) about supplying the Excel workbook, not macros, so, it is something different, as far as I understand. At least, in the Excel, the certification for workbook and macros looks in very different ways.
Any automated, no-menu solution is ok, at least, I can call external tools from Java.