• <legend id='iZnA1'><style id='iZnA1'><dir id='iZnA1'><q id='iZnA1'></q></dir></style></legend>
  • <i id='iZnA1'><tr id='iZnA1'><dt id='iZnA1'><q id='iZnA1'><span id='iZnA1'><b id='iZnA1'><form id='iZnA1'><ins id='iZnA1'></ins><ul id='iZnA1'></ul><sub id='iZnA1'></sub></form><legend id='iZnA1'></legend><bdo id='iZnA1'><pre id='iZnA1'><center id='iZnA1'></center></pre></bdo></b><th id='iZnA1'></th></span></q></dt></tr></i><div id='iZnA1'><tfoot id='iZnA1'></tfoot><dl id='iZnA1'><fieldset id='iZnA1'></fieldset></dl></div>

  • <small id='iZnA1'></small><noframes id='iZnA1'>

      1. <tfoot id='iZnA1'></tfoot>

          <bdo id='iZnA1'></bdo><ul id='iZnA1'></ul>
      2. 如何将 Excel 文件导入 SQL Server?

        How can I import an Excel file into SQL Server?(如何将 Excel 文件导入 SQL Server?)
          <bdo id='SSJeT'></bdo><ul id='SSJeT'></ul>

          • <small id='SSJeT'></small><noframes id='SSJeT'>

              <i id='SSJeT'><tr id='SSJeT'><dt id='SSJeT'><q id='SSJeT'><span id='SSJeT'><b id='SSJeT'><form id='SSJeT'><ins id='SSJeT'></ins><ul id='SSJeT'></ul><sub id='SSJeT'></sub></form><legend id='SSJeT'></legend><bdo id='SSJeT'><pre id='SSJeT'><center id='SSJeT'></center></pre></bdo></b><th id='SSJeT'></th></span></q></dt></tr></i><div id='SSJeT'><tfoot id='SSJeT'></tfoot><dl id='SSJeT'><fieldset id='SSJeT'></fieldset></dl></div>

                  <legend id='SSJeT'><style id='SSJeT'><dir id='SSJeT'><q id='SSJeT'></q></dir></style></legend>

                1. <tfoot id='SSJeT'></tfoot>
                    <tbody id='SSJeT'></tbody>

                2. 本文介绍了如何将 Excel 文件导入 SQL Server?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在 Excel 文件中有数据 - 实际上是

                3. 下一个窗口是选择数据源".选择 Excel:

                  • 在数据源"下拉列表中,选择 Microsoft Excel(如果您安装了 Excel,此选项应自动出现).

                  • 单击浏览"按钮选择要导入的 Excel 文件的路径.

                  • 选择 Excel 文件的版本 (

                  1. 选择目标"屏幕上,选择目标数据库:

                  • 选择服务器名称"、身份验证(通常是您的 sql 用户名和密码)并选择一个数据库作为目标.点击下一步.

                  1. 指定表复制或查询"窗口中:

                  • 为简单起见,只需选择从一个或多个表或视图复制数据",点击下一步.

                  1. '选择源表'从您的 Excel 文件中选择工作表并为每个工作表指定一个目标表.如果您还没有表格,向导将非常友好地创建一个新表格,该表格与您电子表格中的所有列相匹配.点击下一步.

                  2. 点击完成.

                  I have data in an Excel file - actually XLSX format since it is now 2020. My requirement is to get this data into SQL Server as follows:

                  1. ad hoc, the use case being feeding tables with test data, or infrequent data loads of small amounts of data (say < 3k rows), and

                  2. In a repeatable, robust, and possibly automated way for a production system.

                  解决方案

                  There are many articles about writing code to import an Excel file, but this is a manual/shortcut version:

                  If you don't need to import your Excel file programmatically using code, you can do it very quickly using the menu in SQL Server Management Studio (SSMS).

                  The quickest way to get your Excel file into SQL is by using the import wizard:

                  1. Open SSMS (SQL Server Management Studio) and connect to the database where you want to import your file into.

                  2. Import Data: in SSMS in Object Explorer under 'Databases', right-click the destination database, and select Tasks, Import Data. An import wizard will pop up (you can usually just click Next on the first screen).

                  3. The next window is 'Choose a Data Source'. Select Excel:

                  • In the 'Data Source' dropdown list, select Microsoft Excel (this option should appear automatically if you have Excel installed).

                  • Click the 'Browse' button to select the path to the Excel file you want to import.

                  • Select the version of the Excel file (97-2003 is usually fine for files with a .XLS extension, or use 2007 for newer files with a .XLSX extension)

                  • Tick the 'First Row has headers' checkbox if your Excel file contains headers.

                  • Click Next.

                  1. On the 'Choose a Destination' screen, select destination database:

                  • Select the 'Server name', Authentication (typically your sql username & password) and select a Database as destination. Click Next.

                  1. On the 'Specify Table Copy or Query' window:

                  • For simplicity just select 'Copy data from one or more tables or views', click Next.

                  1. 'Select Source Tables:' choose the worksheet(s) from your Excel file and specify a destination table for each worksheet. If you don't have a table yet the wizard will very kindly create a new table that matches all the columns from your spreadsheet. Click Next.

                  2. Click Finish.

                  这篇关于如何将 Excel 文件导入 SQL Server?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Building a comma separated list?(建立一个逗号分隔的列表?)
                  Errors in SQL Server while importing CSV file despite varchar(MAX) being used for each column(尽管每列都使用了 varchar(MAX),但在导入 CSV 文件时 SQL Server 中出现错误)
                  Export table to file with column headers (column names) using the bcp utility and SQL Server 2008(使用 bcp 实用程序和 SQL Server 2008 将表导出到带有列标题(列名称)的文件)
                  Concat field value to string in SQL Server(将字段值连接到 SQL Server 中的字符串)
                  SQL Server Bulk insert of CSV file with inconsistent quotes(SQL Server 批量插入带有不一致引号的 CSV 文件)
                  How can I use a single mssql connection pool across several routes in an Express 4 web application?(如何在 Express 4 Web 应用程序中跨多个路由使用单个 mssql 连接池?)

                      <bdo id='GeFGp'></bdo><ul id='GeFGp'></ul>
                      • <small id='GeFGp'></small><noframes id='GeFGp'>

                          <tbody id='GeFGp'></tbody>

                        <tfoot id='GeFGp'></tfoot>
                        • <i id='GeFGp'><tr id='GeFGp'><dt id='GeFGp'><q id='GeFGp'><span id='GeFGp'><b id='GeFGp'><form id='GeFGp'><ins id='GeFGp'></ins><ul id='GeFGp'></ul><sub id='GeFGp'></sub></form><legend id='GeFGp'></legend><bdo id='GeFGp'><pre id='GeFGp'><center id='GeFGp'></center></pre></bdo></b><th id='GeFGp'></th></span></q></dt></tr></i><div id='GeFGp'><tfoot id='GeFGp'></tfoot><dl id='GeFGp'><fieldset id='GeFGp'></fieldset></dl></div>
                            <legend id='GeFGp'><style id='GeFGp'><dir id='GeFGp'><q id='GeFGp'></q></dir></style></legend>