Şifrelenmiş Office Open XML OOXML Dosyasının Dosya Biçimini Algılama

Contents
[ ]

Aspose.Cells, şifreli Microsoft Açık XML dosyalarının dosya formatını algılamak için bir yol sağlar. Dosya türünü tanımlamak için aşağıdaki gibi FileFormatUtil.DetectFileFormat yöntemini kullanın.

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
//Source directory
string sourceDir = RunExamples.Get_SourceDirectory();
var filename = sourceDir + "encryptedBook1.out.tmp";
Stream stream = File.Open(filename, FileMode.Open);
FileFormatInfo fileFormatInfo = FileFormatUtil.DetectFileFormat(stream, "1234"); // The password is 1234
Console.WriteLine("File Format: " + fileFormatInfo.FileFormatType);