如何从ASP.NET vb中的sql server中的varbinary(max)字段创建工作表 [英] How to create a worksheet from a varbinary(max) field in sql server in ASP.NET vb

查看:90
本文介绍了如何从ASP.NET vb中的sql server中的varbinary(max)字段创建工作表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有网络应用程序,并且我遇到了一些情况,我需要读取存储在sql server table的varbinary(max)字段中的二进制文件,这实际上是一个电子表格,我想创建一个运行时工作表来自varbinary(max)  ,
从中提取数据 并将数据保存回数据库表? 所有在codebehind文件中?


请帮助!

解决方案

这可能是个大问题,所以也许围绕它放置一些范围界限&开始。


(1)Web应用程序;这基本上是实时的,用户期望在短的响应时间内返回一些数据吗?


(2)提取过程是什么;它可以是异步的,所以所有的逻辑都不在代码隐藏文件中吗? 提取/加载过程可以在不同的机器上运行吗?


(2-alt) 可以在后端流程中提取数据吗?可以有一个批处理过程来预先提取所有数据并单独从Db数据驱动您的Web应用程序吗?


(3) 工作簿是否来自可靠来源?它们是xlsx还是xlsm格式?您有更多选项可以从这些格式中获取数据。 xls,xlsb不是开放文件(xml)格式。


(3-a)工作簿数据是一些可预测的结构(e ..定义的范围名称)?


(4)确认:电子表格没有存储为FILESTREAM?


(5)您有SSIS可用吗?


(6)如果您必须实际打开工作簿,那么您的SQL Server登录将需要将其放入该文件夹的权限。据我所知,如果工作簿是xls或xlsb就是这种情况,因为你必须使用某种
Excel查看器或Excel本身"读取"文件。



I have web application and I got some situation that I need to read a binary file stored in sql server table's varbinary(max) field that's actually a spreadsheet, I want to create a runtime worksheet from that varbinary(max)  , extract data out of it and save the data back to DB table?  And all in codebehind file?

Please help!

解决方案

This can be a big question, so maybe put some scope boundaries around it & get started.

(1) Web application; is this essentially real-time, where a user is expecting some data back in a short response time?

(2) What will the extraction process be; can it be asynchronous so all the logic doesn't reside in a codebehind file? Can the extract / Load process run on a different machine?

(2-alt)  Can data be extracted in a back-end process? Can there be a batch process to pre-extract all of the data and drive your Web application from the Db data alone?

(3) Are the workbooks from a trusted source? Are they in the xlsx or xlsm format? You have more options to fetch data from these formats. xls, xlsb are not in the Open File (xml) format.

(3-a) The workbook data is in some predictable structure (e.. Defined Range Name)?

(4) Confirm: The spreadsheet is not stored as a FILESTREAM?

(5) Do you have SSIS available?

(6) If you have to actually open the workbook, then your SQL Server login will require rights to drop it into the folder. To my knowledge, this will be the case if the workbooks are xls or xlsb because you will have to 'read' the file using some sort of Excel viewer or Excel itself.


这篇关于如何从ASP.NET vb中的sql server中的varbinary(max)字段创建工作表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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