| How-To Document
Create a Form to Upload Spreadsheet Data
After completing this How To, you should be able to:
Table of Contents
Many applications need the ability to bulk upload data from a spreadsheet into database tables. This can be accomplished using a TEXTAREA item and some PL/SQL code. In this example, we will upload data about different cars from a spreadsheet into the database.
As a first step, you must create the required schema objects.
Next, you will need to create an HTML DB Application where you can build a form to upload the spreadsheet data. If you would like to implement this functionality into an existing HTML DB Application, then you can skip to the "Create a Form" section.
Now that you have an Application, you will need to create a form and report in order to facilitate the upload.
At this point, run your application by clicking the stop light in the upper right-hand corner of the page, just below the main tabs. You should see a text area called "Upload", and a "Submit" button just below it to the right. If you enter some text, and click on the Submit button, the page should reload sucessfully. At this point, the data is not being uploaded into a table.
In the next steps, we will create a process to upload the data, which references a PL/SQL package which was created when the scripts were run at the beginning of this How To.
Now that we have the process created, we need to create a Report so that we can immediately see the results.
select * from stage_cars
Our application is complete. All we have to do is test it with some sample data.
Discuss this how-to in the OTN Application Express Forum.