Определить формат файла зашифрованного Office Open XML — файлы OOXML
Contents
[
Hide
]
Офис OpenXML(также известный какOOXMLили жеMicrosoft Открытый XML(MOX)) — это формат файла на основе XML, разработанный Microsoft для представления офисных документов, таких как электронные таблицы, диаграммы, презентации и текстовые документы.
Aspose.Cells позволяет определить формат зашифрованного файла.Microsoft Открытый XML файлы. Чтобы определить тип файла, используйтеFileFormatUtil.DetectFileFormat как показано ниже в примере кода.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |