Hello,
Thank you for your inquiry.
I did an initial test, but did not reproduce your issue. I have attached my test code and a screenshot of the test result file. The version I used is the latest version(
Spire.XLS Pack(Hotfix) Version:11.12.2). If you were not using the latest version, please first give it a try. If the issue still exists after trying, please provide the following information for our reference. You could attach them here or send them to us via email (
support@e-iceblue.com). Thanks in advance.
1) Your input excel file.
2) Your test environment, such as OS info (E.g. Windows 7, 64-bit) and region setting (E.g. China, Chinese).
3) Your application type, such as Console app (. Net Framework 4.5).
4) Your tool for viewing the excel result file, such as MS Excel2016.
- Code: Select all
Workbook workbook = new Workbook();
workbook.LoadFromFile(inputFile);
//Add certificate
String inputFile_pfx = "";
X509Certificate2 cert = new X509Certificate2(inputFile_pfx, "e-iceblue");
//Add signature
DateTime certtime = new DateTime(2020, 7, 1, 7, 10, 36);
workbook.AddDigitalSignature(cert, "e-iceblue", certtime);
workbook.AddDigitalSignature(cert, "e-iceblue", certtime);
workbook.AddDigitalSignature(cert, "e-iceblue", certtime);
workbook.AddDigitalSignature(cert, "e-iceblue", certtime);
//Save to file
workbook.SaveToFile(result, ExcelVersion.Version2010);
Sincerely,
Annika
E-iceblue support team