Workbook.GetDigitalSignature
Workbook.GetDigitalSignature method
Gets digital signature from file.
public DigitalSignatureCollection GetDigitalSignature()
Examples
namespace AsposeCellsExamples
{
using Aspose.Cells;
using Aspose.Cells.DigitalSignatures;
using System;
public class WorkbookMethodGetDigitalSignatureDemo
{
public static void Run()
{
// Create a new workbook
Workbook workbook = new Workbook();
// Access the first worksheet
Worksheet worksheet = workbook.Worksheets[0];
// Add some data for context
worksheet.Cells["A1"].Value = "Sample Data";
try
{
// Call the GetDigitalSignature method to retrieve digital signatures
DigitalSignatureCollection digitalSignatures = workbook.GetDigitalSignature();
// Display information about the digital signatures
if (digitalSignatures != null)
{
int count = 0;
foreach (var signature in digitalSignatures)
{
count++;
}
Console.WriteLine("Number of digital signatures: " + count);
Console.WriteLine("GetDigitalSignature method called successfully");
}
else
{
Console.WriteLine("No digital signatures found");
}
// Save the workbook
workbook.Save("GetDigitalSignatureDemo.xlsx");
}
catch (Exception ex)
{
Console.WriteLine("Error calling GetDigitalSignature: " + ex.Message);
}
}
}
}
See Also
- class DigitalSignatureCollection
- class Workbook
- namespace Aspose.Cells
- assembly Aspose.Cells