将 Excel 数据表加载到 Oracle 数据库 [英] Load Excel data sheet to Oracle database

查看:44
本文介绍了将 Excel 数据表加载到 Oracle 数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个免费工具来将 Excel 数据表加载到 Oracle 数据库中.我尝试了 Oracle SQL 开发人员,但它不断抛出 NullPointerException.有什么想法吗?

I am looking for a free tool to load Excel data sheet into an Oracle database. I tried the Oracle SQL developer, but it keeps throwing a NullPointerException. Any ideas?

推荐答案

Excel -> CSV -> Oracle

Excel -> CSV -> Oracle

将 Excel 电子表格保存为文件类型CSV"(逗号分隔值).

Save the Excel spreadsheet as file type 'CSV' (Comma-Separated Values).

将 .csv 文件传输到 Oracle 服务器.

Transfer the .csv file to the Oracle server.

创建 Oracle 表,使用 SQL CREATE TABLE 语句定义表的列长度和类型.

Create the Oracle table, using the SQL CREATE TABLE statement to define the table's column lengths and types.

使用 sqlload 将 .csv 文件加载到 Oracle 表中.像这样创建一个sqlload控制文件:

Use sqlload to load the .csv file into the Oracle table. Create a sqlload control file like this:

load data
infile theFile.csv
replace
into table theTable
fields terminated by ','
(x,y,z)

调用 sqlload 将 .csv 文件读入新表,为 .csv 文件中的每一行在表中创建一行.这是作为 Unix 命令完成的:

Invoke sqlload to read the .csv file into the new table, creating one row in the table for each line in the .csv file. This is done as a Unix command:

% sqlload userid=username/password control=<filename.ctl> log=<filename>.log

如果您只想要一个工具,请使用 QuickLoad

If you just want a tool, use QuickLoad

这篇关于将 Excel 数据表加载到 Oracle 数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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