Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any library to access OLE Structured Storage from C#? [closed]

Tags:

c#

ole

Can I find some open source library for accessing (reading only is ok) OLE Storage like doc or xls files in c#?

like image 929
Rohit Avatar asked May 24 '10 13:05

Rohit


3 Answers

You can use my open source (MPL) library OpenMCDF for a 100% .net implementation of COM structured storage. A sample COM structured storage file viewer is also available as a usage sample of the library.

like image 154
ironfede Avatar answered Oct 13 '22 23:10

ironfede


An excellent article describes the usage.

COM structured storage from .NET

like image 7
Rohit Avatar answered Oct 13 '22 22:10

Rohit


OleDbConnection can handle structured storage as long as the appropriate OLE DB driver is installed on the machine your app is running on.

Excel:

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\myFolder\myExcel2007file.xlsx;
    Extended Properties="Excel 12.0 Xml;HDR=YES";

Text:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\txtFilesFolder\;
    Extended Properties="text;HDR=Yes;FMT=Delimited";

ConnectionStrings.com has a whole host of other Data Sources that you can access via OLE with the built-in libraries.

like image 2
Justin Niessner Avatar answered Oct 13 '22 23:10

Justin Niessner