简体   繁体   English

有没有办法将多个excel文件中的数据导入SQL Server?

[英]Is there a way to import data from multiple excel files into SQL Server?

I have a bunch of excel files (with tables) in a folder that I want to import into SQL Server.我想导入到 SQL Server 的文件夹中有一堆 excel 文件(带表格)。 Is there a loop or some code that I can write in SQL that will go to file path, open the file and import the data into the table?是否有我可以在 SQL 中编写的循环或一些代码,这些代码将转到文件路径、打开文件并将数据导入表中? (I have data for each state so opening 50 tables will be tedious and I am looking to avoid doing so.) (我有每个州的数据,所以打开 50 个表会很乏味,我希望避免这样做。)

您可以使用Power Query for Excel 工作簿合并为一个工作簿,然后将其加载到 SQL Server 中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM