从SQL Server表加载Excel文件并读取单元格 [英] Load Excel file from SQL server table and read cells

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

问题描述

我的excel文件存储在varbinary(max)字段的sql服务器表中.因此,现在我需要读取这些文件并提取一些数据.我该怎么办?谢谢

I have excel files stored in an sql server table in varbinary(max) field.  So now I need to read these file and extract some data. How can I do that ?  Thank you

推荐答案

首先,您需要提取Excel数据并将其写入Excel文件(.xls或.xlsx,具体取决于在原始文件上).以下链接有一个示例:

First, you will need to extract the Excel data and write it to an Excel file (.xls or .xlsx depending upon the original file). The below link has an example:

http://stackoverflow .com/questions/17613214/how-to-to-retrieve-varbinary-values-from-sql-server-2008-using-vb-net

保存文件后,您可以使用Excel Automation或数据访问(OLEDB)提取数据.知道您需要提取哪些数据可能会有所帮助.

After the file has been saved you can extract the data using either Excel Automation or data access (OLEDB). It would probably help to know what data you need to extract.


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

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