如何使用OLEDB查询内存中的Excel数据? [英] How to query Excel data which is in memory using OLEDB?
问题描述
我在网页上有文件上传控件。用户将上传excel文件,并在我的代码中,首先将excel文件保存到磁盘,然后通过OLEDB连接打开它并执行我的工作。
我的问题是:是否仍要避免将此文件保存到磁盘?
I have a file upload control on a web page. Users will upload the excel files and in my code, first I save the excel file to the disk and then open it with OLEDB connection and do my stuff. My question is: Is there anyway to avoid saving this file to disk?
推荐答案
SpreadsheetGear适用于.NET 可以从文件System.IO.Stream或byte []中打开工作簿,因此您可以加载工作簿而不将其保存到磁盘。
SpreadsheetGear for .NET can open a workbook from a file, System.IO.Stream or byte[], so you can load a workbook without saving it to disk.
您可以在此处下载免费试用版。
You can download a free trial here.
免责声明:我拥有SpreadsheetGear LLC
Disclaimer: I own SpreadsheetGear LLC
这篇关于如何使用OLEDB查询内存中的Excel数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!