I use Aspose.Cell for Net 22.10 to compress file to 7Zip with password,It throw a exception when i ity to decompress the result 7Zip file.
The sample code:
void Main()
{
var targetFilePath=@"C:\Users\XCL\Desktop\result.7z";
using (var zipFile = File.Open(targetFilePath, FileMode.Create))
{
var archive = new SevenZipArchive(new SevenZipEntrySettings(null , new SevenZipAESEncryptionSettings("123456")));
archive.CreateEntry("demo.docx",@"C:\Users\XCL\Desktop\demo.docx");
archive.Save(zipFile);
}
using (var archive = new Aspose.Zip.SevenZip.SevenZipArchive(targetFilePath))
{
archive.ExtractToDirectory(@"C:\Users\XCL\Desktop\result","123456");
}
}
the exception info:
20221014135045.png (60.6 KB)