, Guest>> || || |
/ Oracle
  Excel to FAQ?  [new]
UK0IAI
Member

:
: 13529
.

OLE2, WEB , HTML. - . IE, - , .

( TEXT_IO) ( UTL_FILE). () OLE2 WEB.

:
--    SCOTTA   
PROCEDURE DEMO_SCOTT_SIMPLE IS

 CURSOR CR IS
 (
 SELECT 
  EMPNO,   --  
  ENAME,   --  
  JOB,     -- 
  MGR,     -- 
  HIREDATE,--     
  SAL,     --    
  COMM,    -- 
  DEPTNO   -- 
 FROM EMP
 );

 row_num number:=2;
 
BEGIN
  WBE_UTL.NM_DIR  := 'C:\TEMP';  --       
  WBE_UTL.NM_FILE := 'SCOTT_EMP_SIMPLE.xls'; --    

  WBE_UTL.INIT_WEB;   --  
  WBE_UTL.MAKE_HEAD;  --  
  WBE_UTL.WRITE_HEAD; --   

  --  
  WBE_UTL.AutoNumRow := FALSE;  WBE_UTL.PrnBold := TRUE;
  WBE_UTL.PUT (1,1,'  ');
  --  
  WBE_UTL.AutoNumCol := TRUE; WBE_UTL.PrnCol :=1; --     ...
  
  WBE_UTL.PUT (2,1, ' ');    --      
  WBE_UTL.PUT (2,2, ' ',15); --  .... 
  WBE_UTL.PUT (2,3, '');         --    .. ""  
  WBE_UTL.PUT (2,4, '',5);     
  WBE_UTL.PUT (2,5, ' ',15);      
  WBE_UTL.PUT (2,6, '',10);         
  WBE_UTL.PUT (2,7, '',10);          
  WBE_UTL.PUT (2,8, '');      
  WBE_UTL.PrnBold := FALSE;
  --   
    
  --   
  FOR R IN CR LOOP
    WBE_UTL.AutoNumCol := TRUE; WBE_UTL.PrnCol :=1;
   	row_num := row_num + 1;

    WBE_UTL.PUT (row_num,1, R.EMPNO);   --  
    WBE_UTL.PrnBold := TRUE;
    WBE_UTL.PUT (row_num,1, R.ENAME);   --  
    WBE_UTL.PrnBold := FALSE;

    WBE_UTL.PUT (row_num,1, R.JOB);     -- 
    WBE_UTL.PUT (row_num,1, R.MGR);     -- 
    WBE_UTL.PUT (row_num,1, TO_CHAR(R.HIREDATE,'DD.MM.YYYY'),5, DAT);--     

    WBE_UTL.PrnBold := TRUE;
    WBE_UTL.TEXT_ALIGN := RIGHT;
    WBE_UTL.PUT (row_num,1, NF(R.SAL,3),7,NUM);     --    
    WBE_UTL.PrnBold := FALSE;

    WBE_UTL.PUT (row_num,1, R.COMM);    -- 
    WBE_UTL.PUT (row_num,1, R.DEPTNO);  -- 
    WBE_UTL.PUT (row_num,1, TO_CHAR(R.HIREDATE,'DD.MM.YYYY'),15, DAT);--     
    WBE_UTL.TEXT_ALIGN := NULL;
  END LOOP;
  
   COMMIT;
   WBE_UTL.WRITE_BODY; --     
   WBE_UTL.CLOSE_WEB;  --  
END;



PROCEDURE TEST_OUT_PUT IS

BEGIN 
WBE_UTL.NM_DIR  := 'C:\TEMP';  --       
WBE_UTL.NM_FILE := 'TEST.xls'; --    

WBE_UTL.INIT_WEB;   --  
WBE_UTL.MAKE_HEAD;  --  
WBE_UTL.WRITE_HEAD; --   

--     PUT ()
--   P_ROW_NUM 	  	NUMBER  ,    	-- 
--   P_COL_NUM 	  	NUMBER  , 		-- 
--   P_VAL 			  	varchar2,    	-- 
--   P_VAL_TYPE   	VARCHAR2,	    --  
--   P_VAL_LEN    	NUMBER  ,  		--  

--   P_FONT_WEIGHT  VARCHAR2,     --  
--   P_FONT_SIZE   VARCHAR2,      --   
--   P_FONT_COLOR 	VARCHAR2,	   	--  
--   P_TEXT_ALIGN    VARCHAR2,    --   
--   P_VERTICAL_ALIGN    VARCHAR2,--   
--   P_CELL_BORDER  VARCHAR2,     --  
   
--   P_VAL_FMT 	  	VARCHAR2,   	--  
--   P_FONT_STYLE 	VARCHAR2,     --  
--   P_FONT_FAMILY  VARCHAR2,     --  
--   P_VAL_HIGH   	NUMBER    		--  
--   P_BACKGROUND   VARCHAR2      --  
--   P_COLSPAN      NUMBER ,      -- -  
--   P_COLSPAN_WIDTH NUMBER       --   

--   ...  ...     
--       
--       
FOR I IN 1..1  LOOP
     WBE_UTL.PUT (I,1,'' , 'CHR', 25, 'BOLD',16,'RED', 'RIGHT','middle','BORDER','','','','','YELL','','');  
     WBE_UTL.PUT (I,2, 123.45 , 'NUM', 15, '','','gray', 'left','','','','','','','','','');
     WBE_UTL.PUT (I,4,'','CHR', 30, '','','blue', 'center','','','','','','','','','');
     WBE_UTL.PUT (I,6,''  ,'CHR', 10, '','','green', '','','','','','','','','','');

     WBE_UTL.PUT (2,1,'' , CHR, 25, BOLD,16,RED, RIGHT,middle,BORDER,'',ITALIC,TIMES,'',YELL,'','');  
     WBE_UTL.PUT (2,2, 123.45 , NUM, 15, '','',gray, left,'','','','',TAHOMA,'',RED,'','');
     WBE_UTL.PUT (2,4,'',CHR, 30, '','',blue, center,'','','','','','','','','');
     WBE_UTL.PUT (3,7, ''  ,CHR, 10, '','',green, '','','','','','','','','','');
     WBE_UTL.PUT (4,1, '01.04.2004' ,DAT, 10, '','',green, '','','','','','','','','','');
END LOOP;
--     ( )
COMMIT;
-- 
WBE_UTL.WRITE_BODY; --     
WBE_UTL.CLOSE_WEB;  --  
END;

:
PROCEDURE DEMO_SCOTT IS

 CURSOR CR IS
 (
 SELECT 
  EMPNO,   --  
  ENAME,   --  
  JOB,     -- 
  MGR,     -- 
  HIREDATE,--     
  SAL,     --    
  COMM,    -- 
  DEPTNO   -- 
 FROM EMP
 );

 row_num number:=2;
 
BEGIN
  WBE_UTL.NM_DIR  := 'C:\TEMP';  --       
  WBE_UTL.NM_FILE := 'SCOTT_EMP.xls'; --    

  WBE_UTL.INIT_WEB;   --  
  WBE_UTL.MAKE_HEAD;  --  
  WBE_UTL.WRITE_HEAD; --   

  --  
  WBE_UTL.AutoNumRow := FALSE;  WBE_UTL.PrnBold := TRUE;

  WBE_UTL.FONT_COLOR :=RED; WBE_UTL.FONT_SIZE := 16; WBE_UTL.BACKGROUND := YELL;
  WBE_UTL.COLSPAN := 3; WBE_UTL.COLSPAN_WIDTH := 30;

  WBE_UTL.VAL_HIGH := 20; -- 
  WBE_UTL.PUT (1,1,'  ');
  WBE_UTL.COLSPAN := NULL; WBE_UTL.COLSPAN_WIDTH := NULL;
  WBE_UTL.VAL_HIGH := NULL;

  WBE_UTL.PUT (1,2,'');  --  ....    
  WBE_UTL.PUT (1,3,'');
  WBE_UTL.PUT (1,4,'');
  
  WBE_UTL.FONT_COLOR :=NULL; WBE_UTL.FONT_SIZE := NULL; WBE_UTL.BACKGROUND := NULL;

  WBE_UTL.PrnBold := FALSE;

  --  
  WBE_UTL.AutoNumCol := TRUE; WBE_UTL.PrnCol :=1; --     ...
                                                  -- ,    
  WBE_UTL.FONT_COLOR     :=BLUE;
  WBE_UTL.TEXT_ALIGN     := CENTER;
  WBE_UTL.VERTICAL_ALIGN := MIDDLE;	
  WBE_UTL.CELL_BORDER	   := BORDER;
  WBE_UTL.PrnBold        := TRUE;
 
  WBE_UTL.VAL_HIGH := 50;-- 
 
  WBE_UTL.PUT (row_num,1, ' ',6);    --      
  WBE_UTL.PUT (row_num,2, ' ',15);   --  .... 
  WBE_UTL.PUT (row_num,3, '',10);        
  WBE_UTL.PUT (row_num,4, '',5);     
  WBE_UTL.PUT (row_num,5, ' ',10);      
  WBE_UTL.PUT (row_num,6, '',7);         
  WBE_UTL.PUT (row_num,7, '',7);          
  WBE_UTL.PUT (row_num,8, '', 5);      

  WBE_UTL.VAL_HIGH := NULL; --    

  WBE_UTL.FONT_COLOR := NULL;
  WBE_UTL.TEXT_ALIGN := NULL;
  WBE_UTL.VERTICAL_ALIGN := NULL;	
  WBE_UTL.CELL_BORDER	:= NULL;
  WBE_UTL.PrnBold := FALSE;
  --   
    
  --   
  FOR R IN CR LOOP
    WBE_UTL.AutoNumCol := TRUE; WBE_UTL.PrnCol :=1;
   	row_num := row_num + 1;

    WBE_UTL.PUT (row_num,1, R.EMPNO);   --  

    WBE_UTL.PrnBold := TRUE;
    WBE_UTL.PUT (row_num,1, R.ENAME);   --  
    WBE_UTL.PrnBold := FALSE;

    WBE_UTL.PUT (row_num,1, R.JOB);     -- 
    WBE_UTL.PUT (row_num,1, R.MGR);     -- 
    WBE_UTL.PUT (row_num,1, TO_CHAR(R.HIREDATE,'DD.MM.YYYY'),5, 'DAT');--     

    WBE_UTL.PrnBold := TRUE;
    WBE_UTL.TEXT_ALIGN := RIGHT;
    WBE_UTL.PUT (row_num,1, NF(R.SAL,3),'',NUM);     --    
    WBE_UTL.PrnBold := FALSE;

    WBE_UTL.PUT (row_num,1, R.COMM);    -- 
    WBE_UTL.PUT (row_num,1, R.DEPTNO);  -- 

    WBE_UTL.TEXT_ALIGN := NULL;
  END LOOP;
  
   COMMIT;
   WBE_UTL.WRITE_BODY; --     
   WBE_UTL.CLOSE_WEB;  --  
END;

:-)???? ??? ?

. - 0Kb
8 04, 11:27[1018376]      |
 Re: Excel to FAQ?  [new]

Member

:
: 91
. select,
HTML. .
, , .

DECLARE
x0 VARCHAR2(32567);
BEGIN
x0:='1 ; 2 {
select
ppcnt_zero_date " "
,ppcnt_finish_date " "
,ppcnt_code ""
,abonent ""
,ppsbj_type " "
,ppsbj_name ""
,pricends ""
from CC_BILLING_MEG_DOP
where sys_dataput>=ppcnt_zero_date and nvl(pricends,0)!=0
order by ppcnt_zero_date,ppcnt_code,abonent desc
}';
Htmlfile.CREATEQUERY (
Htmlfile.ARRAY(x0)
,Htmlfile.ARRAY('/u04/source/temp','meg_datanulldetal.xls')
);
END;
8 05, 10:28[1451001]      |
 Re: Excel to FAQ?  [new]
thorn
Member

:
: 115
. select,
HTML. .
, , .
8 05, 12:56[1451758]      |
 Re: Excel to FAQ?  [new]
thorn
Member

:
: 115
XML , XSLT
8 05, 12:57[1451762]      |
 Re: Excel to FAQ?  [new]
Ora-
Member

:
: 913
2 UK0IAI

Excel-?
8 05, 13:01[1451791]      |
 Re: Excel to FAQ?  [new]
trr
Guest

create or replace procedure exc is
cnt NUMBER(3) := 5;
begin
 owa_util.mime_header(ccontent_type => 'application/vnd.ms-excel');
 htp.p('ID;ORACLE');
 htp.p('C;Y4;X1;K"aaa"');
 htp.p('C;X2;K"bbb"');
 htp.p('C;X3;K"ccc"');
 htp.p('C;X4;K"ddd"');
 
for i in (select 1 id1, 2 id2, 3 id3, 4 id4 from dual union 
          select 5 , 6 , 7 , 8  from dual) loop
      htp.p('C;Y'||cnt||';X1;K"'||i.id1||'"');
      htp.p('C;Y'||cnt||';X2;K"'||i.id2||'"');
      htp.p('C;Y'||cnt||';X3;K"'||i.id3||'"');
      htp.p('C;Y'||cnt||';X4;K"'||i.id4||'"');
      cnt:=cnt+1;
end loop;
end exc;
:-)
8 05, 13:23[1451902]      |
 Re: Excel to FAQ?  [new]
UK0IAI
Member

:
: 13529
Ora-
2 UK0IAI

Excel-?


... ... txt_ ...

<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1251">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 10">
<link rel=File-List href="alex.files/filelist.xml">
<link rel=Edit-Time-Data href="alex.files/editdata.mso">
<link rel=OLE-Object-Data href="alex.files/oledata.mso">
<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:LastAuthor>alex</o:LastAuthor>
  <o:Created>2004-08-06T12:01:24Z</o:Created>
  <o:LastSaved>2004-08-06T12:04:48Z</o:LastSaved>
  <o:Version>10.4219</o:Version>
 </o:DocumentProperties>
</xml><![endif]-->
<style>
<!--table
...........
( )

web-, .

sql_Plus
.... .... ORACLE Server 6.0 for DOS.

UTL_FILE TEXT_IO (Developr 2) - OLE2 ( ) .... ..... ( OLE2

?

... (?).

"" (?).... .... WBE_UTL.PUT (2,1, ' ');
()... - ...

... ...
8 05, 17:58[1453586]      |
 Re: Excel to FAQ?  [new]
UK0IAI
Member

:
: 13529
trr

create or replace procedure exc is
cnt NUMBER(3) := 5;
begin
 owa_util.mime_header(ccontent_type => 'application/vnd.ms-excel');
 htp.p('ID;ORACLE');
 htp.p('C;Y4;X1;K"aaa"');
 htp.p('C;X2;K"bbb"');
 htp.p('C;X3;K"ccc"');
 htp.p('C;X4;K"ddd"');
 
for i in (select 1 id1, 2 id2, 3 id3, 4 id4 from dual union 
          select 5 , 6 , 7 , 8  from dual) loop
      htp.p('C;Y'||cnt||';X1;K"'||i.id1||'"');
      htp.p('C;Y'||cnt||';X2;K"'||i.id2||'"');
      htp.p('C;Y'||cnt||';X3;K"'||i.id3||'"');
      htp.p('C;Y'||cnt||';X4;K"'||i.id4||'"');
      cnt:=cnt+1;
end loop;
end exc;
:-)


...

BEGIN
  WBE_UTL.NM_DIR  := 'C:\TEMP';  --       
  WBE_UTL.NM_FILE := 'SCOTT_EMP_SIMPLE.xls'; --    

  WBE_UTL.INIT_WEB;   --  
  WBE_UTL.MAKE_HEAD;  --  
  WBE_UTL.WRITE_HEAD; --   
  WBE_UTL.AutoNumCol := TRUE; WBE_UTL.PrnCol :=1;

  for r in (select * from scott.emp) loop
     row_num := row_num + 1;
     WBE_UTL.PUT (row_num,1, R.EMPNO);   --  
     WBE_UTL.PUT (row_num,1, R.ENAME);   --  
     WBE_UTL.PUT (row_num,1, R.JOB);     -- 
     WBE_UTL.PUT (row_num,1, R.MGR);     -- 
     WBE_UTL.PUT (row_num,1, TO_CHAR(R.HIREDATE,'DD.MM.YYYY'),5, DAT);
     WBE_UTL.PUT (row_num,1,  R.SAL);     --    
     WBE_UTL.PUT (row_num,1, R.COMM);    -- 
     WBE_UTL.PUT (row_num,1, R.DEPTNO);  -- 
     WBE_UTL.PUT (row_num,1, TO_CHAR(R.HIREDATE,'DD.MM.YYYY'),15, DAT);--   
  end loop
  WBE_UTL.WRITE_BODY; --     
  WBE_UTL.CLOSE_WEB;  --  
END

, ...
-
8 05, 18:11[1453633]      |
1 .
 Re: Excel to FAQ?  [new]
mayton
Member

: loopback
: 49819
. - - WBE_UTL ?
.
13 06, 09:48[2874507]      |
 Re: Excel to FAQ?  [new]
mayton
Member

: loopback
: 49819
... .
13 06, 09:56[2874538]      |
 Re: Excel to FAQ?  [new]
kharitov_da
Member

:
: 13
mayton
. - - WBE_UTL ?
.

?
12 06, 08:47[3521821]      |
 Re: Excel to FAQ?  [new]
oragraf
Member

: Moscow
: 1317
, .
12 06, 10:08[3522161]      |
 Re: Excel to FAQ?  [new]
kharitov_da
Member

:
: 13
oragraf
, .

?
12 06, 13:58[3524232]      |
 Re: Excel to FAQ?  [new]
oragraf
Member

: Moscow
: 1317
kharitov_da
oragraf
, .

?

, WBE_UTL - , , .
12 06, 15:29[3525100]      |
1 .
 Re: Excel to FAQ?  [new]
spg_stany
Member

:
: 8
UK0IAI
?
8 09, 10:13[7629900]      |
 Re: Excel to FAQ?  [new]
byVOL
Member

: - :)
: 16
spg_stany
UK0IAI
...?


- , () .. . - , , *.csv "". :)
21 09, 13:48[7686967]      |
 Re: Excel to FAQ?  [new]
UK0IAI
Member

:
: 13529
byVOL
spg_stany
UK0IAI
...?


- , () .. . - , , *.csv "". :)

.. 5 . .... ... . , !. , . - , php ( ). .
- , . , , MS Office. , .

- :

2.	       ,    API, . 
	Grid.Open;
	Ggid.Put (nom_row, nom_col, Value_1, format_fmt);
	Ggid.Put (nom_row, nom_col, Value_2, format_fmt);
	Ggid.Put (nom_row, nom_col, Value_3, format_fmt);
	Grid.Print;
	Grid.Close;
.
, .

(WEB_UTL.rar - 83Kb) c
23 09, 23:49[7700646]      |
 Re: Excel to FAQ?  [new]
spg_stany
Member

:
: 8
UK0IAI, respect
25 09, 16:14[7709334]      |
1 .
 Re: Excel to FAQ?  [new]
pym933
Member

:
: 11
UK0IAI,
27 10, 08:00[9682134]      |
/ Oracle