Reputation: 11
I have a signed Excel workbook and I want to delete the signature from it. The problem is that when I try to delete the signature there's a prompt for confirming the deletion and I want the process to be fully automatic. Here's a code sample, the prompt appears when the last line executes:
Dim source As String = "c:\temp\signed.xlsx"
Dim app As New Application()
app.Visible = True
Dim book As Workbook = app.Workbooks.Open(source, UpdateLinks:=0)
app.ShowToolTips = False
Dim sig As Microsoft.Office.Core.Signature = book.Signatures.Item(1)
sig.Delete()
Thanks
Upvotes: 0
Views: 1368
Reputation: 11
using Aspose.Cells 5.2.0.0 can add and remove digital signature in excel 2007
Upvotes: 1
Reputation: 11
I ended up using the SaveAs function of the Workbook object. Saving a copy of the document removes any signatures. I'd still like to hear if there's a more elegant solution though.
Upvotes: 0