oracle存储过程读xls,并插入数据到数据库 oracle 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 create or replace procedure prc_orctoexcel ISl_file utl_file.file_type; a VARCHAR2(1024);BEGIN l_file :=utl_file.fopen('SJQYDIR','444.xls','w'); utl_file.put_line(l_file,'测试oracle数据导入excel'); utl_file.put(l_file,'111' || CHR(9)); utl_file.put(l_file,'222' || CHR(9)); utl_file.put(l_file,'333' || CHR(9)); utl_file.fclose(l_file); l_file :=utl_file.fopen('SJQYDIR','444.xls','r'); utl_file.get_line(l_file,a); dbms_output.put_line(a); utl_file.fclose(l_file);end prc_orctoexcel; 之前写的一个在oracle中向excel写数据的例子,希望对你有帮助。'SJQYDIR'是提前定义好的dir。 sql语句求助!!!! merge into 错误 Oracle10g XP安装中的问题 求助高手!! 磁盘已条带化,为执行并行查询,还需要对表进行分区吗? 创建JOB 报字符串缓冲区太小 初级菜鸟问些小问题 oracle9i 要怎样才能把所有数据查询出来(不符合条件的也需要) jdbc的问题 C#连接Oracle查询异常 请高手帮我看下。为什么我拿不到值 ORACLE DBMS作业执行问题求助 从一个表中找出相对于另一个表变更的数据
l_file utl_file.file_type;
a VARCHAR2(1024);
BEGIN
l_file :=utl_file.fopen('SJQYDIR','444.xls','w');
utl_file.put_line(l_file,'测试oracle数据导入excel');
utl_file.put(l_file,'111' || CHR(9));
utl_file.put(l_file,'222' || CHR(9));
utl_file.put(l_file,'333' || CHR(9));
utl_file.fclose(l_file);
l_file :=utl_file.fopen('SJQYDIR','444.xls','r');
utl_file.get_line(l_file,a);
dbms_output.put_line(a);
utl_file.fclose(l_file);
end prc_orctoexcel; 之前写的一个在oracle中向excel写数据的例子,希望对你有帮助。
'SJQYDIR'是提前定义好的dir。