java 获取excel 中的数字签名,Excel宏的数字签名

In our project we have an excel template (.xlt) and an add-ins file (.xla). These files are used to create a dataview. Dataview is nothing but a kind of report. The xla contains code to create controls for creating, deleting, managing the dataview and its contents. These controls are OCX controls created in VC++ for creating the dataview. We have the add-ins code separately and the template file separately.

The xlt and xla was digitally signed for ensuring that the code is tamper proof. Everything was working fine until digital signature came into picture. The dataview is created by opening the template file (.xlt) and saving the file in .xls extension thereby not changing the digitally signed xlt and xla files. When we try to save this we get the following message "YOu are trying to modify a signed project. You do not have the right key to sign the project ...."

When we give Save changes and discard signature the signature is lost only for the new file generated. The signature remains the same for xlt and xla.

We also tried to manually edit the cells in the excel and save it but we do not get this above message. Only after creating the dataview using the OCX control and saving them pop ups the above message.

解决方案

I too had a similar problem. I found out that it was only happening when my macros would insert or delete a worksheet into the workbook. It turns out that because each worksheet has macros specific to that worksheet adding or deleting worksheets effectively modifies the macro source code.

Thanks to Keith Survell at Turbo Law for getting me pointed in the right direction on this issue:

I have not been able to find an authoritative Microsoft source that explains this issue.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值