FileType

SpreadsheetRootPackage.FileType property

Gets the file type metadata package.

public SpreadsheetTypePackage FileType { get; }

Property Value

The file type metadata package.

Examples

This example shows how to detect the exact type of a loaded spreadsheet and extract some additional file format information.

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

    Console.WriteLine(root.FileType.FileFormat);
    Console.WriteLine(root.FileType.SpreadsheetFormat);
    Console.WriteLine(root.FileType.MimeType);
    Console.WriteLine(root.FileType.Extension);
}

See Also