将 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

相关文章