Oracle Apex Plugin to upload excel to Database

 Oracle Apex Plugin to upload excel to Database

COLLECTION SELECT STATEMENT :
------------------------------------------

SELECT seq_id seq
,C001  EMPNO
,C002  DT
,C003  INOUT
FROM apex_collections
Where COLLECTION_NAME='XLS';

PLUGIN NAME :   Excel2Collection

Download Link

PROCESS :

BEGIN
    FOR C_XLS IN
    (
    SELECT seq_id seq
    ,C001  EMPNO
    ,C002  DT
    ,C003  INOUT
    FROM apex_collections
    Where COLLECTION_NAME='XLS'
    AND LTRIM(RTRIM(C001))<>'Empno')
  LOOP
    INSERT INTO ATTENDENCE VALUES (
    TO_CHAR(C_XLS.EMPNO),
    TO_DATE(substr(ltrim(rtrim(C_XLS.DT)),1,10),'DD-MM-YYYY'),
    C_XLS.INOUT);
  END LOOP;
  apex_application.g_print_success_message := '<span>'||'Excel Data Uploaded. '||'</span>';
END;

CLEAR :

APEX_COLLECTION.TRUNCATE_COLLECTION(p_collection_name => 'XLS');




Muhammad Abdullah Al Noor

Muhammad Abdullah Al Noor, An Oracle Apex Consultants and founder of Noors Technology (www.noorstech.com). Core Expertise : Database Administration, Oracle Forms and Reports Development, Oracle Apex Application Designer and Development, Linux Professional etc. Also the owner of TrainerBD Training and OraDemy E-Learning. WhatsApp +8801790721177

Post a Comment

Previous Post Next Post