DDE - From EXCEL to FORMS
Hi!, I have used (DDE PACKAGE) to get data from EXCEL SHEETS into ORACLE FORMS, and it worked properly , my question is if there is a way or idea (Other than using TIMERS) to have a link between the - Very frequently changed EXCEL cells - and ORACLE FORMS that would keep intouch with the most recent updated EXCEL cells.
Please note that I could solve the problem using timers but that was against the overall performance.
Thanks,
Firas AlKhatib
Hi Firas AlKhatib
Pls Can U send me the form which transfers data from excel into forms?
I'll be gratefull to u...
Prashanth Deshmukh
Similar Messages
-
Upload data from excel to forms 9.0.4 using webutil 1.0.5
Hi,
can anybody provide me the code how to upload the data from excel to forms 9.0.4 using ole2 fuction. From forms to excel it is working fine.
RegardsHello,
Instead of selecting one key figure in data view, please select all key figures of the planning book and then try all the steps which you have carried out.
please revert after you carry out this.
Regards,
Prafulla -
How to upload data from excel to form using webutil
Hi,
In the sample provided by Oracle
http://www.oracle.com/technology/products/forms/htdocs/webutil/howto_ole.html
Note 247606.1 How to Copy Records From a Form Into Excel
It shown the methods of how to copy data from form to excel but is there any sample to provide the step on how to read the cell from excel into Form in 10g.declare
args client_ole2.list_type;
application client_ole2.obj_type;
vworkbooks client_ole2.obj_type;
vdoc client_ole2.obj_type;
vworksheet client_ole2.obj_type;
vrange client_ole2.obj_type;
begin
-- create app object
application := client_ole2.create_obj('Excel.Application');
client_OLE2.SET_PROPERTY(application, 'Visible','True');
-- get workbooks object
vworkbooks := client_ole2.get_obj_property(application, 'Workbooks');
-- and open a file
args := client_ole2.create_arglist;
client_ole2.ADD_ARG(args, 'c:\tp_ae.xls');
vdoc :=client_ole2.INVOKE_OBJ(vworkbooks,'Open',args);
client_ole2.destroy_arglist(args);
-- get a worksheet object
-- for this to work you need to know the sheet name or its index
args := client_ole2.create_arglist;
client_ole2.ADD_ARG(args, 1); <-- name or index
vworksheet := client_ole2.get_obj_property(vdoc,'Worksheets',args);
client_ole2.destroy_arglist(args);
-- get a range object which in this case is just a cell
-- for this to work you need to know the cell coordinates
args := client_ole2.create_arglist;
client_ole2.ADD_ARG(args, 'B6');
vrange := client_ole2.get_obj_property(vworksheet,'Range',args);
client_ole2.destroy_arglist(args);
-- and here you get the value
message(client_ole2.get_char_property(vrange,'Value'));
-- release objects
client_ole2.release_obj(vrange);
client_ole2.release_obj(vworksheet);
client_ole2.release_obj(vdoc);
client_ole2.release_obj(vworkbooks);
client_ole2.release_obj(application);
end; -
Hi All,
I'm importing data from excel to forms.
I'm Importing the data from the first worksheet.
For this I'm using the code
OLE2_DEC.V_EXCEL_WORKSHEETS := CLIENT_OLE2.GET_OBJ_PROPERTY (OLE2_DEC.V_EXCEL_WORKBOOK, 'Worksheets');
V_LIST := CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG (V_LIST, *1*);
Here the Number '1' in the above line specifies that the data from the first worksheet is to be imported(that is left most worksheet in the excel).
Now I have more than one worksheet(in the same Excel sheet) from where the data is to be imported.
Due to the above code Everytime I want to import data from work sheet other than the first, I'm making the worksheet to be imported to be the first sheet(left most).
So, to avoid this Can I loop something So that I will get all the data from all the work sheets in the Excel avoiding Manuall adjustment of the worksheets.So, to avoid this Can I loop somethingDid you try it? Maybe something like
OLE2_DEC.V_EXCEL_WORKSHEETS := CLIENT_OLE2.GET_OBJ_PROPERTY (OLE2_DEC.V_EXCEL_WORKBOOK, 'Worksheets');
FOR i IN 1..MAXNUM LOOP
V_LIST := CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG (V_LIST, i);
END LOOP; -
Can we drag table from excel to form graphs on Keynotes?
I am used to drag tables that I create on excel to form charts on powerpoint.
Will I be able to do so on keynote. I do not wish to duplicate my efforts on excel .
Also, is there smart graphics equivalent on Keynotes too?Another method to import Excel file is using DDE, its advantage is that it does not need to install the ODBC driver.
Regards,
George
I want the user to press a button and import data from Excel into a temp Oracle table.
Is this possible and how do I do it?
If this is possible, how can I programmatically update the permanent table with the
data in the temp table based on the field name (such as budget_line_number)
instead of a static value (such as '12345') in the where clause. I.E, I want to write code like:
UPDATE budget_table --- this is the permanent table
SET all fields in the permanet table
where budget_line_number = budget_line_number --from the temporary table
Thanks.
Bob -
Error while importing data from excel to forms
Hi,
I am working on Oracle forms 10g, and I'm supposed to import data from excel sheet to forms.
While the user enters the data,sometimes after entering a particular word he/she hits the alt+enter button.
As a result the data appears in two lines in a single row
So,when I try to import the data it's not importing the data in a right manner.
S0,I want to replace this linefeed and carry with five spaces.
Eg:The user instead of entering Geekpedia enters Geek
pedia
in the excel sheet.
Now when I import this in the forms I want it to be imported as Geek Pedia.(5 spaces between Geek and pedia).Maybe you can consider save excel as .csv files and then you can load them as flatfiles to external table in OWB.
-
Calling DDE from Excel 2010 crashing on Win 8.1 VM
Trying to use DDE to connect Excel to an external application (Vensim DSS) on a windows 8.1 virtual machine (VM) which seems to hang Excel (specifically when you call DDEInitiate). I have no problems with the same VBA script (code reproduced below if needed)
on a standard PC with windows 8.1 and Vensim DSS. Also a previous incarnation with windows 7 VM and Vensim worked with no problem. Does anybody have ideas what is different on a win 8.1 VM or some process that I need to ensure is running on the VM for DDE
to work?
I have tried with Excel 2003, Excel 2007 and Excel 2010 and all experience the same issue of hanging when calling the DDEInitiate function.
Many thanks in advance,
Dave
Option Explicit
Dim DDE_channel As Integer
Function StartupDDE() As Boolean
Dim blnIsRunning As Boolean
On Error GoTo Err_Handler
blnIsRunning = VensimRunningCheck
'Check to see if Channel Number has already been assigned
If Not DDE_channel > 0 Or blnIsRunning = False Then
'Channel not assigned - check to see if Vensim running
If blnIsRunning = False Then
'Vensim not running - try to open
Dim RetVal
RetVal = Shell("C:\Program Files (x86)\Vensim\Vensim.exe", vbMaximizedFocus)
AppActivate "Microsoft Excel"
Excel.Application.Visible = True
End If
'Connect to Vensim
DDE_channel = Application.DDEInitiate("VENSIM", "System")
End If
StartupDDE = True
Exit Function
Err_Handler:
MsgBox "There was an error trying to connect to Vensim. Please close and reopen Vensim manually", vbExclamation
+ vbOKOnly, "Vensim Connect Error"
StartupDDE = False
End FunctionHi,
As far as I know, the DDE is a very old technology, I recommend we try to use the Access object model instead of DDE.
http://msdn.microsoft.com/en-us/library/office/ff192120(v=office.15).aspx
If you have any further question about debugging code, I recommend you post the question to the MSDN forum for Excel
http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc
The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
George Zhao
TechNet Community Support
It's recommended to download and install
Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
programs. -
Hi All,
I have a request from the client to import the data from an excel file on to forms.
We are using 9iDB , 9iDs and 10g IAS . Please help.
The scenario is the client recieves some quotation in excel files which always will be in a standard format.So either all of the values of excel or some values from it needs to be loaded like the price which a vendor is quoting.
The form is in Master Detail format.
I would apprecitae if some one can give me example source code also while replying.
Thanks allFirstly, is it a true xls file or a csv ?
Even if it has an xls extension you may find that it is actually in csv format.
Open it in notepad and see whether it is simply data or whether it contains excel code.
If it is a csv there is no need for OLE. You could read it direct into the form using TEXT_IO or use sqlloader from a host command. To use sqlloader you may need to use webutil file transfer or some other method first to get it onto the application server.
If it IS a true xls you can use OLE, or to be more precise for web forms, CLIENT_OLE2, part of webutil. This can be used to load the data direct into the form. However, it is not particularly quick, and I have found that if there is a lot of data involved, it is better to use CLIENT_OLE2 to do a save-as to create a csv and then load that. -
Upload the data from excel sheet to form 6i
hi all,
i am using Forms [32 Bit] Version 6.0.8.24.1 (Production)
my requirement is to import data from excel to forms.
i have gone through the help, they have mentioned as below
To build this demo:
1 Create a spreadsheet containing the initial data and formulae that you want to appear in your form.
2 In the Layout Editor, click the OLE container tool and drag out the area where you want to display the spreadsheet.
3 From the pop-up menu on the OLE container, click Insert Object.
4 Click Create from File. Enter the name of the spreadsheet. Click OK.
5 In the Object Navigator, attach the library EXCEL.PLL.
6 To get the value of a cell, call the function GETCELL from the SPREADSHEET package contained in the EXCEL library.
To get the value of a cell, call the procedure SETCELL from the same package.
7 To add other interactions with the spreadsheet, use the OLE2 built-in package. Consult the Excel documentation
for details of Excel’s object model.but if anybody explain this with sample then it will be useful for me..This is first time i am comming such type of requirement across.
Thanks..hi,
i have some sample code(taken from some source)
DECLARE
application ole2.obj_type;
workbooks ole2.obj_type;
workbook ole2.obj_type;
args ole2.list_type;
worksheets OLE2.OBJ_TYPE;
worksheet OLE2.OBJ_TYPE;
BEGIN
application:=ole2.create_obj('Excel.Application');
ole2.set_property(application, 'Visible', 'True');
workbooks := OLE2.GET_OBJ_PROPERTY(application, 'workbooks');
args:=ole2.create_arglist;
ole2.add_arg(args, 'FILE_NAME');
workbook:= ole2.invoke_obj(workbooks, 'Open',args);
ole2.destroy_arglist(args);
args:=ole2.create_arglist;
ole2.add_arg(args, 'c:\Pasta1!teste'); --how to pass the arguments
ole2.invoke(application, 'Run', args);
ole2.destroy_arglist(args);
ole2.release_obj(workbook);
ole2.release_obj(workbooks);
ole2.release_obj(application);
END; but i don't know how to pass the arguments(i have to pass the excell cell values(data)as an arguments)
Suggest me to proceed further..
Thanks..
Edited by: user13329002 on Nov 13, 2010 1:16 AM -
hi all,
i am using Forms [32 Bit] Version 6.0.8.24.1 (Production).
i am uploading data from excel to form(record wise)and saving.
now i am reading the data from 2nd row by assuming that 1st row followed with columns titles.But, my question is we cannot predict the excel that the record always starts from 2nd row. how check for the starting for the actual data
is its something like if column1 is null and col2 is null and col3 is null
then increment the row and repeat the process.. but, upto which record i should continue this process..
anybody is having better solution than this..
Thanks..Hi,
The nice option would be keep the upload (start from and end) manually, What i mean is in the uploading screen put two more fields like Start Row and End Row and let the user fill these fields before starting the upload process. So, if any error will happen during upload then let the user handle.
-Ammad -
Uploading data from MS-Excel to form
To upload from Microsoft Excel files (.xls) to display in the form the following need to be done.
Create two blocks in the first block create three fields in which the first is text item. Name it as TXT_FILE_NAME. The other two items are buttons. Name it BTN_BROWSE and BTN_UPLOAD respectively.
In the second block, make it a multi-record block. Create 15 text items inside the second block with naming such as OUTPUT1 to OUTPUT15.
Now do the following:
1. The following is the code inside BTN_BROWSE
DECLARE
filename VARCHAR2(256);
BEGIN
filename := GET_FILE_NAME(File_Filter=> 'Excel Files
(*.xls)|*.xls|');
if filename is not null then
:txt_file_name := filename;
end if;
go_item('txt_file_name');
END;
2. In the BTN_UPLOAD code do the following
DECLARE
AppID PLS_INTEGER;
ConvID PLS_INTEGER;
Buffer VARCHAR2(240);
ROWCOL VARCHAR2(20);
CNT NUMBER;
BEGIN
AppID := DDE.App_Begin(<complete-path-of-excel-executable>||:TXT_FILE_NAME, DDE.App_Mode_Minimized);
ConvID := DDE.Initiate('EXCEL', :TXT_FILE_NAME);
GO_BLOCK('BLOCK2');
FIRST_RECORD;
FOR I IN 5 .. 500 LOOP
CNT := 0;
FOR J IN 1 ..6 LOOP
BUFFER := '';
CNT := CNT + 1;
DDE.Request (ConvID, 'R'||I||'C'||J, Buffer, DDE.Cf_Text, 240);
BUFFER := RTRIM(LTRIM(BUFFER));
BUFFER := SUBSTR(BUFFER,0,LENGTH(BUFFER)-2);
IF BUFFER IS NULL THEN
EXIT;
END IF;
COPY(BUFFER,'BLOCK2.OUTPUT'||TO_CHAR(CNT));
END LOOP;
IF BUFFER IS NULL THEN
EXIT;
END IF;
CREATE_RECORD;
END LOOP;
DDE.Terminate(ConvID);
DDE.App_End(AppID);
FIRST_RECORD;
END;
=====================================================
Author : Anantha Narayanan
email : [email protected]
=====================================================First link explains all about your question, Refer second one for more ideas.
Reading Excel Sheet from Java without using any Framework
Enhanced File Upload - Uploading and Processing Excel Sheets
Regards
Vinod -
How to copy text from Excel to a text field in the form?
Hi All,
I want to copy a text from Excel or Word file and paste it in a text field in the form, How?
I tried to use ctrl+c for copy and ctrl+v for paste but it doesn't work!hi, i've seen this problem before but can't remember what the solution was...
but just by searching on this forum resulted in this link
Re: Copy and Paste
hope it helps -
How to load the data from excel file into temprory table in Forms 11g?
Hi
How to Load the data from excel file(Extension is .CSV) into the temporary table of oracle in Forms11g.
My Forms Version is - Forms [64 Bit] Version 11.1.2.0.0 (Production)
Kindly Suggest the Solution.
Regards,
SachinDeclare
v_full_filename varchar2(500);
v_server_path varchar2(2000);
v_separator VARCHAR2(1);
v_filename VARCHAR2(400);
filename VARCHAR2 (100);
v_stop_load varchar2 (2000);
v_rec_error_log varchar2(4000);
v_error_log varchar2(4000);
ctr NUMBER (12);
cols NUMBER (2);
btn number;
RES BOOLEAN;
application ole2.obj_type;
workbooks ole2.obj_type;
workbook ole2.obj_type;
worksheets ole2.obj_type;
worksheet ole2.obj_type;
cell ole2.obj_type;
cellType ole2.OBJ_TYPE;
args ole2.obj_type;
PROCEDURE olearg
IS
args ole2.obj_type;
BEGIN
args := ole2.create_arglist;
ole2.add_arg (args, ctr);
ole2.add_arg (args, cols);
cell := ole2.get_obj_property (worksheet, 'Cells', args);
ole2.destroy_arglist (args);
END;
BEGIN
v_full_filename := client_get_file_name(directory_name => null
,file_name => null
,file_filter => 'Excel files (*.xls)|*.xls|'
||'Excel files (*.xlsx)|*.xlsx|'
,message => 'Choose Excel file'
,dialog_type => null
,select_file => null
If v_full_filename is not null Then
v_separator := WEBUTIL_CLIENTINFO.Get_file_Separator ;
v_filename := v_separator||v_full_filename ;
:LOAD_FILE_NAME := substr(v_filename,instr(v_filename,v_separator,-1) + 1);
RES := Webutil_File_Transfer.Client_To_AS(v_full_filename,"server_path"||substr(v_filename,instr(v_filename,v_separator,-1) + 1));
--Begin load data from EXCEL
BEGIN
filename := v_server_path||substr(v_filename,instr(v_filename,v_separator,-1) + 1); -- to pick the file
application := ole2.create_obj ('Excel.Application');
ole2.set_property (application, 'Visible', 'false');
workbooks := ole2.get_obj_property (application, 'Workbooks');
args := ole2.create_arglist;
ole2.add_arg (args, filename); -- file path and name
workbook := ole2.get_obj_property(workbooks,'Open',args);
ole2.destroy_arglist (args);
args := ole2.create_arglist;
ole2.add_arg (args, 'Sheet1');
worksheet := ole2.get_obj_property (workbook, 'Worksheets', args);
ole2.destroy_arglist (args);
ctr := 2; --row number
cols := 1; -- column number
go_block('xxx');
FIRST_RECORD;
LOOP
--Column 1 VALUE --------------------------------------------------------------------
olearg;
v_stop_load := ole2.get_char_property (cell, 'Text'); --cell value of the argument
:item1 := v_stop_load;
cols := cols + 1;
--Column 2 VALUE --------------------------------------------------------------------
olearg;
:item2 := ole2.get_char_property (cell, 'Text'); --cell value of the argument
cols := cols + 1;
--<and so on>
ole2.invoke (application, 'Quit');
ole2.RELEASE_OBJ (cell);
ole2.RELEASE_OBJ (worksheet);
ole2.RELEASE_OBJ (worksheets);
ole2.RELEASE_OBJ (workbook);
ole2.RELEASE_OBJ (workbooks);
ole2.RELEASE_OBJ (application);
END;
--End load data from EXCELPlease mark it as answered if you helped. -
How can I populate a dynamic form from Excel data (beginner)
I am reasonably certain this is beginner-level but I cannot seem to figure out how to do this. I have data in an ecxel file and I would like to import that data into a form using LS. I need to distribute the unique data to each recipient. (I have included an example below) I would really appreciate any advice. If there is a tutorial that explains this I would be happy to go through that. Thanks in advance.
Customer
Acct No
Equipment
Sales Rep
Email
Pear Computing
1
Motherboard A
Jim Smith
[email protected]
Pear Computing
1
Video Card A
Jim Smith
[email protected]
Orange Computing
2
Motherboard B
Jim Smith
[email protected]
Orange Computing
2
Super Mouse
Jim Smith
[email protected]
Plum Computing
3
Awesome Monitor
Tanya Smith
[email protected]
Apple Computing
4
Motherboard S
Tanya Smith
[email protected]
Apple Computing
4
Super Mouse II
Tanya Smith
[email protected]
Raisin Computing
5
Motherboard R
Bob Smith
[email protected]
Cherry Computing
6
SoundLoud Soundcard
Bob Smith
[email protected]
I would like to send a template e-mail to each sales rep at "PC.com" that says:
Dear <SalesRep>,
<Customer> has the following equipment:
<Account No> | <Customer> | <Equipment>
I would like all the data for each customer to go to the sales rep. For instance, Jim should get an e-mail stating that "Pear Computing" has two items, and a separate e-mail stating that "Orange Computing" has two items. What I want to avoid is the MS Word mail merge solution that equates to Jim getting 4 emails. I would like the equipment to be grouped by customer number or account number. I would prefer to have a dynamic layout with flowed page as the number of items per customer will vary.
PLEASE HELP!
JDyou can copy/paste data from Excel to Illustrator
-
Copy/Paste more than 64K from Excel to Oracle Forms
We need to copy from Excel more than 64K of data into Oracle Forms 10g. After the copy/paste action. The data will be split and saved in the database. The data contains 6000 fields of each 14 characters.
What we tried: Create a Long field in forms (maximum size 64K) and process the data which is in this field. But by using PLSQL the maximum size is only 32K. So currently we can only copy and process 32K at a time.
Is there a way to process over 64K from an excelsheet via Oracle Forms 10g R2?
Can it be done via Java and how?
Is it possible to read the clipboard in parts of 30K blocks and paste it in the Long field block with multirecords?
Restrictions:
We are not allowed to do file upload and process it on the server side.
Thanks for your help!Hello,
In the form, you can use Text Items that have datatype as long, so you can strore 64K.
I do not understand the problem with the PL/SQL, because you can pass 32Ko chunks as many as needed.
<p>Also, see this article</p>
Francois
Maybe you are looking for
-
PI7.1 install error on windows server 2008 64 bit
error at import ABAP TRACE: 2009-03-14 06:50:03 com.sap.inst.migmon.LoadTask run Loading of 'SAPNTAB' import package is started. INFO: 2009-03-14 06:50:03 com.sap.inst.migmon.LoadTask processPackage Task file 'C:\Program Files\sapinst_instdir\PI71\IN
-
Converting standard date into GMT Format based on Zone
Hi, I want to get GMT date based on the current date and Zone information i enter. For example. inputs are current date : 11/11/2006 15:35:37 Zone information : PDT (i.e. America/Los_Angeles) out should be GMT date : Saturday, November 11, 2006 2:05:
-
Opening a dropdown by JavaScript
Hi, Is there any way to open a combobox/choicelist by javascript, when I press a particular key? Any related link or example? I use Jdev 11.1.1.3 with ADF Faces RC. Thanks.
-
Express Message to Users - How to
hi all, i want to send Express Message to all Current Users in the one application Server. How can i do that? I can able to see all the Users by Using SM04. with this one can i Send Express message? or i have use some other Tcode.? Thnx,
-
Mail app constantly freaking out. SMTP now broken
The mail app on my late 2010 iMac has been acting weird for quite some time. I tried erasing everything and restarting but the mail app still had some data in it somehow. I would love a link to information on how to start completely fresh in only M