Solved

Loading data form Excel to Oracle tables using Forms 6i

Posted on 2003-12-09
2
1,685 Views
Last Modified: 2012-05-04
I have a task to load data form MS Excel  into Oracle tables using Forms 6i. I've search throught the documentation and one of the slutions offered was using  DDE (Dynamic Data Exchange).
The issue I have with an example that it requires to hard code  Excel directory
with an assumtion that it's located on drive C , D, etc.

APPID := DDE.APP_BEGIN(C:\MSOFFICE\EXCEL\excel.EXE',  DDE.APP_MODE_MINIMIZED);  

Are there any way that allows me to find out where excel executable is located.
I was trying to use just "excel.exe", but it doesn't work.
Are there any better solutions on how to load data from excel to Oracle table using forms. (please do not suggest SQL*Loader)
0
Comment
Question by:ipesin
  • 2
2 Comments
 
LVL 47

Accepted Solution

by:
schwertner earned 500 total points
Comment Utility
There is an library with a name like D2KUTIL or something like this that has many Windows function.
Some of these functions are find function, other can take lists of files in directories.
You can download this library from OTN.
0
 
LVL 47

Expert Comment

by:schwertner
Comment Utility
Another way is to use HOST command and FIND function of the Windows. If you succeed to write the directory in a file, Forms can read that file using TEXT_IO package.

For Windows 2000 (from online help):

Filter commands
Filter commands help you sort, view, and select parts of a command's output.
Passing information through filter commands
Filter commands divide, rearrange, or extract portions of the information that passes through them. Windows 2000 has three filter commands:
·      The more command displays the contents of a file or the output of a command one screen at a time.
·      The find command searches through files and command output for the characters you specify.
·      The sort command alphabetizes files and command output.
To send input from a file to a filter command, use the less-than sign (<). If you want the filter command to get its input from another command, use the pipe (|).
Controlling the Screen Display by Using the More Command
The more command displays the contents of a file or the output of a command one screen at a time. For example, the following more command displays the contents of the List.txt file one screen at a time:
more < list.txt
After a screen of information is displayed, the word "More" appears. To continue to the next screen, press any key on the keyboard. To stop the command without viewing more information, press CTRL+C.
The more command is helpful if you are working with a command that produces more than one screen of output. For example, suppose you want to view a tree for your hard disk. If you have more directories than Windows 2000 can display on the screen, you can use the tree command with a pipe (|) and a more command, as in the following example:
tree c:\ | more
The first screen of output from the tree command is displayed, followed by the word "More." Windows 2000 pauses until you press any key on the keyboard (except PAUSE).
Searching for text by using the find command
The find command searches one or more files for the text you specify. Windows 2000 displays every line containing that text. The find command can be used as a filter command or as a standard Windows 2000 command. For information about using find as a standard Windows 2000 command, click find in the Related Topics list.
To use find as a filter command, include a less-than sign (<) and a file name to search through. Keep in mind that the search is case sensitive when entering a file name. For example, the following command finds occurrences of the string "Pacific Rim" in the file Trade.txt:
find "Pacific Rim" < trade.txt
To save the output of the find command rather than display it, use a greater-than sign (>) and the name of the file that is to store the output. For example, the following command finds occurrences of "Pacific Rim" in the Trade.txt file and saves them in the Nwtrade.txt file:
find "Pacific Rim" < trade.txt > nwtrade.txt
Sorting text files
The sort command alphabetizes a text file or the output of a command. For example, you would use the following command to sort the contents of a file named List.txt and display the results on your screen:
sort < list.txt
In this example, the sort command sorts the lines of the List.txt file and displays the results without changing the file. To save the output of the sort command rather than display it, include a greater-than sign (>) and a file name in the command. For example, you would use the following command to alphabetize the lines of the List.txt file and store the results in the Alphlist.txt file:
sort < list.txt > alphlist.txt
To sort the output of a command, type the command followed by a pipe (|) and the sort command. For example, the following command sorts the output of the find command:
find "Jones" maillst.txt | sort
When you type this command, Windows 2000 lists in alphabetic order the lines in which the string "Jones" appears.
Combining commands with redirection characters
You can combine filter commands, other commands, and file names to make custom commands. For example, you could use the following command to store the names of files that contain the string "LOG":
dir /b | find "LOG" > loglist.txt
Windows 2000 sends the output of the dir command through the find filter command and stores the file names that contain the string "Log" in the Loglist.txt file. The results are stored as a list of file names (for example, A.log, Logdat.svd, and Mylog.bat).
To use more than one filter in the same command, separate the filters with a pipe (|). For example, the following command searches every directory on drive C, finds the file names that include the string "Log", and displays them one screen at a time:
dir c:\ /s /b | find "LOG" | more
Because you use a pipe (|), Windows 2000 sends the output of the dir command through the find command. The find command selects only file names that contain the string "Log." The more command displays the file names that are selected by the find command, one screen at a time.

0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Via a live example, show how to take different types of Oracle backups using RMAN.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now