InspectionPackage

SpreadsheetRootPackage.InspectionPackage property

Gets a metadata package containing inspection results for the document. The package contains information about document parts that can be considered as metadata in some cases.

public SpreadsheetInspectionPackage InspectionPackage { get; }

Property Value

A metadata package containing inspection results for the document.

Remarks

Learn more

Examples

This code snippet shows how to inspect a spreadsheet document.

using (Metadata metadata = new Metadata(Constants.InputXls))
{
    var root = metadata.GetRootPackage<SpreadsheetRootPackage>();

    if (root.InspectionPackage.Comments != null)
    {
        foreach (var comment in root.InspectionPackage.Comments)
        {
            Console.WriteLine(comment.Author);
            Console.WriteLine(comment.Text);
            Console.WriteLine(comment.SheetNumber);
            Console.WriteLine(comment.Row);
            Console.WriteLine(comment.Column);
        }
    }

    if (root.InspectionPackage.DigitalSignatures != null)
    {
        foreach (var signature in root.InspectionPackage.DigitalSignatures)
        {
            Console.WriteLine(signature.CertificateSubject);
            Console.WriteLine(signature.Comments);
            Console.WriteLine(signature.SignTime);

            // ...
        }
    }

    if (root.InspectionPackage.HiddenSheets != null)
    {
        foreach (var sheet in root.InspectionPackage.HiddenSheets)
        {
            Console.WriteLine(sheet.Name);
            Console.WriteLine(sheet.Number);
        }
    }
}

See Also