Results 1 to 4 of 4

Thread: Insertion of clean Excel data into oracle table using html

  1. #1
    Join Date
    May 2008
    Posts
    260

    Insertion of clean Excel data into oracle table using html

    I have created a form using HTML. Now i have to browse excel sheet and on click of submit button i want excel data to be submitted in oracle table through procedure.

    Its very urgent.

    Please help me out.

  2. #2
    Join Date
    May 2008
    Posts
    194

    Re: Insertion of clean Excel data into oracle table using html

    you can call this ddl in dynamic sql to create a external table.

    Code:
    CREATE TABLE EMP_ext 
    ( 
    EMPNO NUMBER (4), 
    ENAME VARCHAR2 (10 BYTE), 
    JOB VARCHAR2 (9 BYTE), 
    MGR NUMBER (4), 
    HIREDATE DATE, 
    SAL NUMBER (7,2), 
    COMM NUMBER (7,2), 
    DEPTNO NUMBER (2), 
    MERGE VARCHAR2 (50 BYTE) 
    ) 
    ORGANIZATION EXTERNAL ( 
    TYPE ORACLE_LOADER 
    DEFAULT DIRECTORY XML_DIR 
    ACCESS PARAMETERS ( 
    RECORDS DELIMITED BY NEWLINE 
    FIELDS TERMINATED BY ',' 
    MISSING FIELD VALUES ARE NULL 
    ) 
    LOCATION ( 'emp.txt') 
    ) 
    PARALLEL 5 
    REJECT LIMIT UNLIMITED;

  3. #3
    Join Date
    May 2008
    Posts
    376

    Re: Insertion of clean Excel data into oracle table using html

    Or You can use the following code to do that data loading. Of course with some modifications.

    Code:
    / * Formatted on 2008/05/14 13:43 (Formatter Plus v4.8.7) * / 
    DECLARE 
    f UTL_FILE.file_type; 
    s VARCHAR2 (200); 
    l LONG: =''; 
    i NUMBER (3): = 0; 
    BEGIN 
    f: = UTL_FILE.fopen ( 'XML_DIR', 'emp.txt', 'R'); 
    WHILE (TRUE) 
    LOOP 
    UTL_FILE.get_line (f, s); 
    DBMS_OUTPUT.put_line (s); 
    i: = i + 1; 
    l: = l | | s; 
    END LOOP; 
    EXCEPTION 
    WHEN NO_DATA_FOUND 
    THEN 
    DBMS_OUTPUT.put_line ('================ END OF FILE ================'); 
    DBMS_OUTPUT.put_line ( '** NO OF LINES:' | | i); 
    DBMS_OUTPUT.put_line (l); 
    UTL_FILE.fclose (f); 
    INSERT INTO chk_long VALUES (l); 
    WHEN OTHERS 
    THEN 
    DBMS_OUTPUT.put_line 
    ('================ SOME ERROR OCCURED ==============='); 
    UTL_FILE.fclose (f); 
    END;

  4. #4
    Join Date
    May 2008
    Posts
    390

    Re: Insertion of clean Excel data into oracle table using html

    "form using HTML" implies a client front end.
    "excel data" implies excel file which is Microsoft proprietary data format (binary data).
    "submitted in oracle table" implies excel data on client has to get from client to database server.

    Hint: you will need some java that is written to access files on the client through the web browser (which then reads the binary file and uploads it to a BLOB in a table on the database).

    If this is not your requirement you need to be more clear.

Similar Threads

  1. Convert Excel data to HTML Table
    By Chalina in forum Software Development
    Replies: 2
    Last Post: 04-08-2009, 11:21 PM
  2. need to show data in other html table for php
    By Quattro in forum Software Development
    Replies: 3
    Last Post: 02-07-2009, 11:44 PM
  3. Create html table from excel file
    By Laler in forum Windows Software
    Replies: 3
    Last Post: 26-06-2009, 08:44 AM
  4. Export data from excel spreadsheet to an Oracle Table
    By Kurtz in forum Windows Software
    Replies: 2
    Last Post: 13-05-2009, 01:11 PM
  5. Importing HTML table in a Spreadsheet - Excel 2007
    By Aarif in forum Tips & Tweaks
    Replies: 1
    Last Post: 01-12-2008, 02:35 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,943,458.83277 seconds with 16 queries