资 源 简 介
OOXML Crypto Stream
Create, open and save password-protected Microsoft Office 2007 files.
Works with Office 2007 files and encryption scheme only (.docx, .xlsx, .pptx). No support for older formats.
Includes slightly modified ExcelPackage for accessing Excel 2007 .xlsx files.
Download the [binary release](http://ooxmlcrypto.googlecode.com/files/OfficeOpenXmlCrypto-bin0.1.zip) (68k).
Written in C# / .Net 3.0
Sample Code
```
using (OfficeCryptoStream stream = OfficeCryptoStream.Open("a.xlsx", "password"))
{
// Do stuff (e.g. create System.IO.Packaging.Package or
// ExcelPackage from the stream, make changes and save)
// Change the password (optional)
stream.Password = "newPassword";
// Encrypt and save the file
stream.Save();
}
```
Details
Office 2007 files (Word 2007 .d