Forms 6I
Why am I doing this? Because, this is a fairly common request in the Oracle Technology Network forums and not everyonethere has a My Oracle Support account and I feel this information should be published openly on the Internet.
Having said this, let’s get down to business and create a form that reads data from Excelinto a Forms Data Block.
Description of included files:
1. create_planets.sql – script to create the table used by this sample code
2. planets_ole_excel_read.fmb – sample form whichdemonstrates the concept
3. planets.xls – Excel (version 2003) sample spreadsheet
Setup steps:
1. Log into your database and run the “create_planets.sql” script
2. Ensure your environment isproperly configured to run WebUtil. This document does not cover this configuration – there is plenty of information available in the OTN forums as well on the Internet that covers configuring WebUtilso I will not included it here.
3. Place “planets.xls’ some place on the client computer. I have modified Oracle’s original form to display a “File Select dialog” rather than hard code the filename and location in the code as Oracle demo did.
4. Ensure you have configured the Forms Builder to allow running a form from the Forms Builder. This document does not cover how to perform thisconfiguration.
5. Run the form from the Forms Builder or on the client computer and push the “Read from Excel” button. Choose the ‘planets.xls’ file from the “Select Client filename to Open”dialog and the data will be read from the Excel spreadsheet into the form. You can then push the save button in the toolbar to commit the data to the table.
Here is the code behind the “Read from...
Regístrate para leer el documento completo.