在内存中OleDbConnection到Excel文件 [英] In Memory OleDbConnection to Excel File
问题描述
我想打开一个OleDbConnection到一个
FileStream内存中的Excel文件。有人知道这是否可行,如何完成?
I would like to open an OleDbConnection to an Excel file that's in memory as a FileStream. Does anyone know if this is possible and how to accomplish it?
大图我想将文件字节传递给.NET CLR存储过程并提取数据。也许有一个更好的方式来做,我没有考虑。
Big picture I would like to pass the file bytes into a .NET CLR Stored Procedure and extract the data. Perhaps there's a better way to do this that I've not considered.
提前感谢。
推荐答案
VSTO解决方案JP提供绝对可行。但是,如果您真的想使用OleDb和一些SQL,请查看这个文字:它是一个MS知识库文章,描述如何使用OleDb从excel导入数据到SQLSever。
The VSTO solution JP offers is definitely viable. However, if you really want to use OleDb and some SQL, take a look at this artcile: it's a MS knowledge base article that describes how to import data from excel into SQLSever using OleDb.
这篇关于在内存中OleDbConnection到Excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!