从流读取Excel文件 [英] Read excel file from a stream

查看:557
本文介绍了从流读取Excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一种方法来读取流的Excel文件。这似乎并不与做事情的ADO.NET的工作方式。

I need a way to read a Excel file from a stream. It doesn't seem to work with the ADO.NET way of doing things.

该方案是一个用户通过上传一个FileUpload一个文件,我需要从文件,并导入到数据库中读取一些值。

The scenario is that a user uploads a file through a FileUpload and i need to read some values from the file and import to a database.

有关几个原因我不能将文件保存到磁盘,没有理由这样做,无论是。

For several reasons I can't save the file to disk, and there is no reason to do so either.

所以,任何人都知道的一种方式,从一个FileUpload流读取Excel文件?

So, anyone know of a way to read a Excel file from a FileUpload stream?

推荐答案

看来我发现了一个soultion到自己的问题。

It seems i found a soultion to the problem myself.

HTTP://www.$c$cplex.com/ExcelDataReader

这似乎库很好地工作,它需要一个流中读取Excel文件。

This library seems to work nicely and it takes a stream to read the excel file.

ExcelDataReader reader = new ExcelDataReader(ExcelFileUpload.PostedFile.InputStream);

这篇关于从流读取Excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆