Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

How we can load .XLSX file of excel into oracle database using PL*SQL?

user-image
Question ajoutée par abdul jabbar , I.T Manager , EHA
Date de publication: 2013/07/26
Jad Al-Quraan
par Jad Al-Quraan , Head of department : analysis and systems development & Oracle DBA , Tafila Technical University

use SQL Loader or toad .... or other tools

mohammed ganbah
par mohammed ganbah , Pharmacies department manager , teb al'osrah medical company

simply i use toad

match the structure of the table with the excel sheet

then import the sheet into table using toad import

then commit the change

voila..., done

Nithin Ashok
par Nithin Ashok , Project Manager , Vision-Box

hey ... you can use SQL Loader for doing this..

Uzair Awan
par Uzair Awan , MIS Assistant , Jamal Din Wali Sugar Mills Ltd

Oracle S.Q.L Developer is the best tool to do this job. Just manage the excel data and apply the label (column headings) same as you have in your table where you want to import the data. Than go to S.Q.L Developer and right click on the desired table and go to Import Data. Here you will be asked to choose the file which you want to import into the table and than select the sheet which is to be imported. This is a step-by-step wizard which will ask you to map the excel file fields with table and in the next phase click on "Verify". This option will verify the data type of each field from excel imported file with table fields. Be careful data types must be same and if you are importing any date column than must provide date format "DD-MON-RRRR" in fields mapping page. When its get verified without any errors just click on finish and all data of that excel file would be imported into the oracle table.

Ali Mahdi Jawad
par Ali Mahdi Jawad , Head of Information Technology , Falcon Cement Co

SQL loader

Or data pump

And your data should be delimited by comma(save as csv)

Javed Farzan
par Javed Farzan , Oracle SCM Techno-Functional Consultant , Galadari Brothers Group

Basically, when working in the production like environment, you cannot just right click and import data. You need an insert script. You can generate the insert script from excel through Macro codes. Here is an example. http://www.businesshut.com/excel-macros/excel-macro-to-generate-sql-insert/ Other methods are through Concatenate function in excel itself. But this is a headache when the list is of thousand records. http://stackoverflow.com/questions/315504/tricks-for-generating-sql-statements-in-excel Thanks, Javed.

Ateeq Aljehani
par Ateeq Aljehani , Procurement Advisor , King Abdullah University of Science and Technology(KAUST)

For this project I took an Apex-plugin I have written, (IR) Report to Excel (xlsx), and turned it into a PL/SQL package. With this package it’s very easy to create an Excel2007 file with only a few lines of PL/SQL code. ?1234 begin as_xlsx.query2sheet( 'select * from dual' ); as_xlsx.save( 'MY_DIR', 'my.xlsx' ); end; The main purpose for this package is getting data from the database into an Excel file, so I deliberate did not include some Excel functionality, such as formulas, into the package. Excel itself is a far better tool for such things. Anton The source code for the package: as_xlsx P.S. I have added the possibility to add Comments and MergedCells to the Excel-file P.S.2 And bold/italic fonts P.S.3 Fixed issue with timezones with a regionname P.S.4 Fixed issue with XML-escaping from text P.S.5 Fixed NLS-issue with column width P.S.6 Added p_rgb to get_font P.S.7 Fixed bug in add_string P.S.8 Fixed set_autofilter (only one autofilter per sheet, added _xlnm._FilterDatabase) Added list_validation = drop-down

Utilisateur supprimé
par Utilisateur supprimé

If it is using plsql then you need to use utl_file or external tables to load the data from excel sheet.

krishna majhi
par krishna majhi , Oracle Consultant / Developer , schlumberger (Contract by MPH/GNRS)

Hi, you could use oraexcel. Its freeware. Regards, Krishna Majhi

abdul jabbar
par abdul jabbar , I.T Manager , EHA

My question is how to import data from excel to oracle

More Questions Like This