Excel行作为记录插入到DB中 [英] Excel row insert into DB as a record

查看:82
本文介绍了Excel行作为记录插入到DB中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好 - 我是CP的新手,想知道我是否可以获得有关如何处理Excel记录到SQL DB项目的指导,我正在努力。





excel spec工具中有一个名为:output values的标签。



第1行是表格列



第2行是由工作簿中的另一个标签填充的值



SQL部分:



我创建了一个SQL DB,我们可以调用 GPackComp



我创建了一个表,其中包含excel选项卡第1行中表示的所有列,如上所述。



需要:



我需要第二行,在excel行中作为记录插入或SQL DB中的一行。





场景:



规范工程师抓住这个excel规范模板从网络上的位置。



工程师将此规格保存到他机器上的本地位置



Spec Engineer开始填写数据



工程师在本地工作x天数或数周的规格,直到所有数据都填写完毕并准备上传并存储在DB中



工程师连接到SQL DB(以某种方式 - 数据连接?)



工程师用行2更新DB上面屏幕截图中代表行的数据。



第2行作为记录存储在数据库中(新行)



规范更新是新行/记录



修改为规格是新行/记录



删除是新行/记录



注:



团队中有12个规范工程师。它们不是技术性的



对于在任何给定时间只打开一份excel表单的东西是不现实的。



每位工程师都希望以某种方式上传第2行数据。



工程师不允许远程进入SQL Server



安全性:



Auth完成网络信用



工程师必须连接到网络才能上传数据/记录。



我的想法:



创建一个Excel VB宏来上传到SQL中。可以这样做吗?



我应该写一个存储过程吗?从来没有这样做过。





一步一步的文章或设计思路的任何帮助都会很棒。





提前致谢,



Jennifer

Hi there - I am new to CP and was wondering if I could get some guidance on what to do about a Excel record to SQL DB item, I'm working on.


There is a tab called: "output values" in a excel spec tool.

Row 1 are the table columns

Row 2 is are values populated by another tab in the workbook

SQL part:

There is a SQL DB that I have created, we can call in "GPackComp"

There is a table I have created with all the columns that are represented in row 1 of the excel tab, mentioned above.

Need:

I need the 2nd row, in the excel row to be inserted as a record or a row in the SQL DB.


scenario:

A Spec Engineer grabs this excel spec template from a location on the network.

Engineer saves this spec to a local location on his machine

Spec Engineer starts filling out data

Engineer works on spec for x amount of days or weeks, locally, until all the data is filled in and ready to be uploaded and store in DB

Engineer connects to SQL DB (in some sort of way – data connection?)

Engineer updates DB with the row 2 data on the represented line in the above screen shot.

Row 2 is stored in DB as a record (new row)

Updates to spec are a NEW row/record

Modify to spec is a NEW row/record

Delete is a NEW row/record

Note:

There are 12 Spec Engineers on the team. They are not technical

Its not realistic to thing that only 1 copy of the excel sheet will be open at any given time.

Each Engineer is expected to "upload" the row 2 data in some sort of fashion.

Engineers are not allowed to remote into the SQL Server

Security:

Auth is done with Network creds

Engineer must be connected to network to upload data/record.

My thoughts:

Create a Excel VB macro to "upload" into SQL. Can this be done?

Should I write a stored procedure? Never done this before.


Any help in a step by step article or design thoughts, would be awesome.


Thanks in advance,

Jennifer

推荐答案

查看SaveToDB加载项:

http://www.savetodb.com/help4/savetodb-getting-started.htm [ ^ ]



它允许使用Microsoft Excel作为数据库数据编辑器。 />
因此,您的工程师可以使用Excel保存和编辑规范。



此外,SaveToDB可以帮助将Web上的数据加载到Excel中数据在常规表中。



安装包中包含多个示例。您可以将它们用作任务的模板。



如果您打算构建自己的应用程序,请使用Visual Studio 2010或更高版本将其构建为Microsoft Excel加载项和VB.NET或C#,而不是VBA。
Look at the SaveToDB add-in:
http://www.savetodb.com/help4/savetodb-getting-started.htm[^]

It allows using Microsoft Excel as a database data editor.
So your engineers can save and edit specifications using Excel.

In addition, SaveToDB can help to load data from the web into Excel if the web data are in regular tables.

The setup package contains multiple examples. You may use them as templates for your tasks.

If you plan to build your own app, build it as a Microsoft Excel add-in using Visual Studio 2010 or higher and VB.NET or C#, not VBA.


这篇关于Excel行作为记录插入到DB中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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