简体   繁体   中英

How to Upload .xls Files into Oracle DB using PL/SQL only

I'm fairly new to using DBs and have been tasked to create an automated process that uploads Excel-Files into a Oracle Database.
I was told that the User should put the files into a dedicated folder and then a process should automatically upload the files. After checking Stackoverflow and the Internet, however it looks to me like there is no way to do the upload with just PL/SQL.

Do i need to use other external tools to achive this or am i just looking the wrong way?
The reason i want to do it with just PL/SQL is that i don't have sys rights on the server or a way to install any tools right now.

You can upload CSV files stored in a folder using SQL Loader directly into Oracle Tables. But you need to have those files stored as CSV not XLS and transfer them to a folder in a server which contains at least an Oracle client. In this case, your user should save the files as csv, and then you must have a pick up process to move them to a server where you can run the sql loader process.

However, if you want to keep using Excel, and you have no option to move the files, Oracle Application Express which is free and included with Oracle Database contains a plugin to upload directly and automatically excel files into tables. You would have to create a small application in Apex with a page for doing this. It is totally out-of-the-box and quite easy. If you use Apex 18c or higher, it is there. If you use Apex 5.1.4 you need to install a plugin. In this case, the user is responsible to upload the excel file by the web apex application, or you can use the API APEX_DATA_PARSER package for doing so without manual intervention. However, keep in mind that if you use the API, you need to have the files accessible for the database.

Apex Data Parser 19c

Let me know if you have more doubts about it. Regards

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM