OpenMcdf 2.2.1.12
See the version list below for details.
dotnet add package OpenMcdf --version 2.2.1.12
NuGet\Install-Package OpenMcdf -Version 2.2.1.12
<PackageReference Include="OpenMcdf" Version="2.2.1.12" />
paket add OpenMcdf --version 2.2.1.12
#r "nuget: OpenMcdf, 2.2.1.12"
// Install OpenMcdf as a Cake Addin #addin nuget:?package=OpenMcdf&version=2.2.1.12 // Install OpenMcdf as a Cake Tool #tool nuget:?package=OpenMcdf&version=2.2.1.12
openmcdf
Structured Storage .net component - pure C#
OpenMCDF is a 100% .net / C# component that allows developers to manipulate Microsoft Compound Document Files (also known as OLE structured storage).
Compound file includes multiple streams of information (document summary, user data) in a single container.
This file format is used under the hood by a lot of applications: all the documents created by Microsoft Office until the 2007 product release are structured storage files. Windows thumbnails cache files (thumbs.db) are compound documents as well as .msg Outlook messages. Visual Studio .suo files (solution options) are compound files and a lot of audio/video editing tools save project file in a compound container.
OpenMcdf supports read/write operations on streams and storages and traversal of structures tree. It supports version 3 and 4 of the specifications, uses lazy loading wherever possible to reduce memory usage and offer an intuitive API to work with structured files.
It's very easy to create a new compound file
byte[] b = new byte[10000];
CompoundFile cf = new CompoundFile();
CFStream myStream = cf.RootStorage.AddStream("MyStream");
myStream.SetData(b);
cf.Save("MyCompoundFile.cfs");
cf.Close();
You can open an existing one, an excel workbook (.xls) and use its main data stream
//A xls file should have a Workbook stream
String filename = "report.xls";
CompoundFile cf = new CompoundFile(filename);
CFStream foundStream = cf.RootStorage.GetStream("Workbook");
byte[] temp = foundStream.GetData();
//do something with temp
cf.Close();
Adding storage and stream items is just as easy...
CompoundFile cf = new CompoundFile();
CFStorage st = cf.RootStorage.AddStorage("MyStorage");
CFStream sm = st.AddStream("MyStream");
...as removing them
cf.RootStorage.Delete("AStream"); // AStream item is assumed to exist.
Call commit() method when you need to persist changes to the underlying stream
cf.RootStorage.AddStream("MyStream").SetData(buffer);
cf.Commit();
If you need to compress a compound file, you can purge its unused space
CompoundFile.ShrinkCompoundFile("MultipleStorage_Deleted_Compress.cfs");
OLE Properties handling for DocumentSummaryInfo and SummaryInfo streams
is now available via extension methods (experimental - api subjected to changes)
PropertySetStream mgr = ((CFStream)target).AsOLEProperties();
for (int i = 0; i < mgr.PropertySet0.NumProperties; i++)
{
ITypedPropertyValue p = mgr.PropertySet0.Properties[i];
...
OpenMcdf runs happily on the Mono platform and supports now .NET Standard 2.0
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.0
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
NuGet packages (33)
Showing the top 5 NuGet packages that depend on OpenMcdf:
Package | Downloads |
---|---|
MsgReader
Read Outlook MSG and EML files without using Outlook. The MSGReader supports MSG E-Mail (also signed), Contact, Appointment, Task, Sticky notes and Contact files. The EML reader supports MIME 1.0 encoded files. |
|
FileSignatures
A small library for detecting the type of a file based on header signature (also known as magic number) rather than file extension. |
|
MsgKit
MsgKit is a 100% managed C# .NET library (no PINVOKE or whatsoever) which may be used for the creation of messages (E-Mail, Appointments, Journals and Stickey Notes) that are Outlook compatible |
|
mzLib
Library for mass spectrometry projects. |
|
OpenMcdf.Extensions
Extensions for OLE Properties and IO.Stream interface for OpenMcdf (Beta) |
GitHub repositories (15)
Showing the top 5 popular GitHub repositories that depend on OpenMcdf:
Repository | Stars |
---|---|
QL-Win/QuickLook
Bring macOS “Quick Look” feature to Windows
|
|
vivami/SauronEye
Search tool to find specific files containing specific words, i.e. files containing passwords..
|
|
michaelweber/Macrome
Excel Macro Document Reader/Writer for Red Teamers & Analysts
|
|
Sicos1977/MSGReader
C# Outlook MSG file reader without the need for Outlook
|
|
freezy/VisualPinball.Engine
:video_game: Visual Pinball Engine for Unity
|
Version | Downloads | Last updated |
---|---|---|
2.3.1 | 476,540 | 3/2/2024 |
2.3.0 | 802,156 | 4/22/2023 |
2.2.1.12 | 553,940 | 8/30/2022 |
2.2.1.9 | 3,150,783 | 9/18/2020 |
2.2.1.6 | 58,402 | 7/22/2020 |
2.2.1.5 | 1,420 | 7/21/2020 |
2.2.1.4 | 612,859 | 12/7/2019 |
2.2.1.3 | 1,173,793 | 10/27/2018 |
2.2.1.2 | 7,216 | 10/6/2018 |
2.2.0.1 | 37,392 | 7/22/2018 |
2.1.6.28924 | 44,600 | 4/14/2018 |
2.1.5.22659 | 16,708 | 3/17/2018 |
2.1.4.23498 | 1,733 | 3/10/2018 |
2.1.3.34730 | 13,042 | 7/22/2017 |
2.1.3.34720 | 2,159 | 6/2/2017 |
2.1.2.1274 | 2,799 | 3/17/2017 |
2.1.0.33051 | 8,240 | 12/29/2016 |
2.0.5739.40493 | 312,648 | 9/18/2015 |
1.5.4.22637 | 21,546 | 1/24/2013 |
Bug fixing #88 and #90