需求:
1、把2个excel的sheet表中的海量数据按照时间,对比起来放在同一个excel的shell中; 
2、两个表为无序, 且存在对方表中的数据在自己表中对应的时间点上不存在的情况

方法一、数据库
(1)使用toad导入数据

将EXCEL文件中某些字段导入到ORACLE数据库的对应表
连接想要导入的数据库
Database--->Import----> Table Data打开了导入窗口
在Object Name中选择你将要导入的表名点击"Show Data" ---> "Execute Wizard"打开了导入向导在导入向导中选择Excel file类型,下一步在import from File中选择刚刚导出的EXCEL文件,下一步默认,下一步;默认,下一步选择数据库字段对应的列,本机是USER_LOGIN_ID对应C列OA_LOGIN_ID对应B列 , 下一步再次确认列有没有导入错误,下一步点“Excecute”执行结束


(2)使用数据库进行操作
步骤1:创建临时表 js_sum
create table js_sum as
( select                                                                                                                        
    JP_NAME                 ,                                                                                                
    JP_CUR_DAY            ,                                                                                                
    JP_START_PRICE    ,                                                                                                
    JP_HIGHEST_PRICE,                                                                                                
    JP_LOWEST_PRICE ,                                                                                                
    JP_LAST_PRICE     ,                                                                                                
    JP_EXCHANGE_SUM ,                                                                                                
    JP_HANDLE_SUM     ,                                                                                                
    JP_CALC_PRICE     ,                                                                                                                                                                                                                            
    SH_NAME                 ,                                                                                                
    SH_CUR_DAY            ,                                                                                                
    SH_START_PRICE    ,                                                                                                
    SH_HIGHEST_PRICE,                                                                                                
    SH_LOWEST_PRICE ,                                                                                                
    SH_LAST_PRICE     ,                                                                                                
    SH_EXCHANGE_SUM ,                                                                                                
    SH_HANDLE_SUM     ,                                                                                                
    SH_CALC_PRICE     ,                                                                                                
    SH_LASTPRICE_UP ,                                                                                                
    SH_PERCENT_OVER                                                                             
    from japan j, shanghai s where    j.JP_CUR_DAY = s.SH_CUR_DAY
);

步骤2:加入2个表中剩余的数据到临时表中

步骤3:排序
将临时表中的所有数据进行排序

(3)使用toad导出数据
从ORACLE数据库导出成为EXCEL文件
利用TOAD连接上数据库,访问某个表,我本机是选中表“EXP_JS”, 右键“Save as...”
为了解决中文乱码问题,所以选择类型为"XLS Instance",如果存在长数字型字符串被改变的问题,
请选中“String Fields as Strings”
选择文件的存放路径 Destination directory
点击“OK”,会打开一个EXCEL文件,文件中已经是导出的数据,点击保存,将这个文件保存即可。

方法2、用Java写程序