如何将我的SQl服务器数据库链接到我的Excel文件 [英] How to link my SQl server database to my Excel File

查看:46
本文介绍了如何将我的SQl服务器数据库链接到我的Excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个已设计的Excel文件和创建的公式。



我想从我的SQL服务器数据库获取数据并在我的excel文件中显示数据并运行我的excel中已存在的公式。



如何将我的Excel连接到数据库并将它们放在数据和公式的预定义位置?

I have an Excel file that is already designed and formulas created .

I want to get data from my SQL server database and show the data in my excel file and run the formulas already exists in my excel.

How to connect my excel to the database and place them in predefined place of the data and formulas?

推荐答案

最简单的方法是使用Excel工具。看看这里:连接到(导入) SQL Server数据 [ ^ ]



您可以随时使用ADODB + VBA:如何使用ADO与Visual Basic或VBA中的Excel数据 [ ^ ]和 CopyFromRecordset [ ^ ]方法。
The simplest way is to use Excel tools. Have a look here: Connect to (import) SQL Server data[^]

You can always use ADODB + VBA: How To Use ADO with Excel Data from Visual Basic or VBA[^] together with CopyFromRecordset[^] method.


您可以使用数据连接向导 [ ^ ]免费的SaveToDB Express加载项。



除了标准的Excel功能外,还允许:



- 连接存储过程;

- 在可视模式下为表和视图指定WHERE过滤器。



您还可以将数据更改保存回数据库。
You may use Data Connection Wizard[^] of the free SaveToDB Express add-in.

In addition to standard Excel features, it allows:

- connecting to stored procedures;
- specifing WHERE filters for tables and views in a visual mode.

Also you can save data changes back to a database.


这篇关于如何将我的SQl服务器数据库链接到我的Excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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