作者:手机用户2502908935 | 来源:互联网 | 2023-09-04 22:43
1.在数据库中新建一张与Excel字段相同的表。注意类型和大小。2.点击Tools→ODBCImporter3.在UserSystemDSN选择ExcelFiles;填上用户名和密
1.在数据库中新建一张与Excel字段相同的表。注意类型和大小。
2.点击 Tools → ODBC Importer
![《PL/SQL导入Excel数据》](https://img.php1.cn/3cd4a/1eebe/cd5/43a754c811e7ec5c.webp)
3.在 User/System DSN 选择 Excel Files; 填上用户名和密码;点击connect。
![《PL/SQL导入Excel数据》](https://img.php1.cn/3cd4a/1eebe/cd5/e62700fe09f8933e.webp)
4.在弹出的框中,选择目录、文件类型等信息。
![《PL/SQL导入Excel数据》](https://img.php1.cn/3cd4a/1eebe/cd5/8373b1277127c518.webp)
5.点击 Data to Oracle, 选择 Owner 和 Table(第一步建立的对应的表)。
在fields的右侧 Field 和 Fieldtype 选择与左侧对应的 name 和 type。
注意类型的大小。
![《PL/SQL导入Excel数据》](https://img.php1.cn/3cd4a/1eebe/cd5/a5d7215df572c386.webp)
6.确认无误后,点击Import, 在右下角可以看见执行的条数和生效的条数。
![《PL/SQL导入Excel数据》](https://img.php1.cn/3cd4a/9b0d/ae9/2d998ad7838fbf16.jpeg)
7.至此,我们可以在sql window中查询此表。
我们会看到已经有了刚刚插入的记录。
此时,PL/SQL导入Excel数据已经成功。
![《PL/SQL导入Excel数据》](https://img.php1.cn/3cd4a/1eebe/cd5/086aec93f5e1e9b2.webp)