I'm trying to build a Apex page where a user can click a button to open a file dialog, browse to an Excel spreadsheet, and import the sheet into an Oracle DB - either creating an Oracle table in the process, or inserting into a pre-defined Oracle table.
Any ideas how to go about this? I've done a lot of searching and drawn a blank so far.
I found an example which allows me to copy / paste the Excel data into a textgrid, but this isn't ideal as it will just lead to user error. I need the user to point and click, then the import is done for them automatically.
I'm not able to schedule the import as the files are generated manually from another system so there's no guarantee they will be there.
I read in a couple of places that Apex can't handle Excel spreadsheets and only works with CSV - is this correct or am I being misinformed?
Yes, you can give a form to User, where user can upload a excel file ( in predefined format) directly into database. Just have a look on following article
Hope will solve your problem..
I think this utility provided by Vikas will give you a more generic solution.
Thanks very much for the replies.
These seem to work for CSV files but they do not appear to work with XLS files. The files I'm trying to load are in MS Excel 2.1 and we cannot get them in another format (they come from and old system which we cannot change).
Any ideas, apart from converting the files manually?
I could write a conversion component using VB/COM but I would rather not go down this route. I also tried using SQL Loader as well but it cannot read XLS files either.
Message was edited by:
The routine you are looking at deals with CSV files.. Try looking at this blog entry, it will need modification to meet your table layout..: http://avdeo.com/2008/05/21/uploading-excel-sheet-using-oracle-application-express-apex/
Never Surrender Dreams!
If this question is answered, please mark the thread as closed and assign points where earned..