简体   繁体   中英

C# - Save uploaded Excel file to MemoryStream, then use it to fill a DataTable

I have an ASP.NET website where I am uploading an Excel file and saving it to disk. I am then using OleDbConnection to query the data and fill a DataTable.

Is there a way to accomplish this in memory without first saving the file to disk?

No affiliation - but this is a great solution: http://www.spreadsheetgear.com/ .

You will eventually run into problems working with Excel (and other data sources) with Jet on 64-bit servers. Save yourself all that headache and go with SpreadSheetGear. We did a project with it in the fall and it's been working flawlessly in production for several months.

我让我的用户以.csv格式导出/保存,并使用A Fast CSV Reader

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM