Solved

Loading data form Excel to Oracle tables using Forms 6i

Posted on 2003-12-09
2
1,703 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 48

Accepted Solution

by:
schwertner earned 500 total points
ID: 9910377
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 48

Expert Comment

by:schwertner
ID: 9910429
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

734 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