In memory OleDbConnection to Excel file

I would like to open OleDbConnection for an Excel file that is in memory as a FileStream. Does anyone know if this is possible and how to do it?

The big picture I would like to transfer the bytes of the files to the .NET CLR stored procedure and extract the data. Perhaps there is a better way to do this that I have not considered.

Thanks in advance.

+7
sql excel sql-server-2005
source share
3 answers

The VSTO JP solution offers a certain value. However, if you really want to use OleDb and some SQL, check out this artcile: this is an MS knowledge base article that describes how to import data from excel into SQLSever using OleDb.

0
source share

You can use SpreadsheetGear to open a file from an array of bytes in memory or from any stream using SpreadsheetGear.Factory.GetWorkbookSet (). Workbooks.OpenFromMemory (byte []) / OpenFromStream (System.IO.Stream).

Disclaimer: I have SpreadsheetGear LLC

+1
source share

You can extract data using VSTO . It has an object model for Excel . Then pass what you want for proc. I think this would be better than trying to have the CLR stored procedure decrypt the Excel file stream.

0
source share

All Articles