Not able to write to Excel using Client_OLE2 and webutil
Hi
I am working on Windows 2000 Pro SP4 Oracle Forms Builder 10.1.2.0.2
I am using webutil to invoke Excel Application .
The following code invokes Excel application and saves in the path specified as Test_Excel and writes the "Test Data to be written" to R1C1 when I use OLE2.
But when I replace OLE2 with Client_OLE2 the Excel file is getting created but the data is not written to the cell.
PL/SQL :could not find program unit being called is the error.
Can anybody help me solve this issue ?
Thanks in advance.
FUNCTION WRITE_TO_EXCEL(
excel_file_name in varchar2, ---for eg.. C:\Test_Excel.xls
buf in varchar2 ) ----Test Data to be written
return boolean is
application CLIENT_OLE2.OBJ_TYPE;
workbooks CLIENT_OLE2.OBJ_TYPE;
workbook CLIENT_OLE2.OBJ_TYPE;
worksheets CLIENT_OLE2.OBJ_TYPE;
worksheet CLIENT_OLE2.OBJ_TYPE;
cell CLIENT_OLE2.OBJ_TYPE;
args CLIENT_OLE2.LIST_TYPE;
begin
application := CLIENT_OLE2.CREATE_OBJ ('Excel.Application');
CLIENT_OLE2.SET_PROPERTY(application, 'Visible', 'True');
workbooks := CLIENT_OLE2.GET_OBJ_PROPERTY(application, 'Workbooks');
workbook := CLIENT_OLE2.Invoke_Obj(workbooks, 'Add');
worksheets := CLIENT_OLE2.Get_Obj_Property(workbook, 'Worksheets');
worksheet := CLIENT_OLE2.Invoke_Obj(worksheets,'Add');
args:=CLIENT_OLE2.create_arglist;
CLIENT_OLE2.add_arg(args,1);
CLIENT_OLE2.add_arg(args,1);
cell:=CLIENT_OLE2.get_obj_property(worksheet, 'Cells', args);
CLIENT_OLE2.destroy_arglist(args);
CLIENT_OLE2.set_property(cell,'Value', buf);
CLIENT_OLE2.release_obj(cell);
CLIENT_OLE2.Release_Obj(worksheet);
CLIENT_OLE2.Release_Obj(worksheets);
args := CLIENT_OLE2.Create_Arglist;
CLIENT_OLE2.Add_Arg(args,excel_file_name);
CLIENT_OLE2.Invoke(workbook, 'SaveAs', args);
CLIENT_OLE2.Destroy_Arglist(args);
args := CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG(args,'Caption');
CLIENT_OLE2.INVOKE(application,'Run',args);
CLIENT_OLE2.destroy_arglist(args);
CLIENT_OLE2.Release_Obj(workbook);
CLIENT_OLE2.Release_Obj(workbooks);
CLIENT_OLE2.Invoke(application, 'Quit');
CLIENT_OLE2.Release_Obj(application);
return(TRUE);
exception
when others then
message (error_type||'-'||error_code||':'||error_text);
message (' ');
SET_APPLICATION_PROPERTY(CURSOR_STYLE,'default');
CLIENT_OLE2.RELEASE_OBJ(application);
CLIENT_OLE2.RELEASE_OBJ(workbooks);
CLIENT_OLE2.RELEASE_OBJ(workbook);
CLIENT_OLE2.release_obj(worksheet);
CLIENT_OLE2.release_obj(worksheets);
return(FALSE);
END;
What line is actually causing the error? Also, I assume you tested the exact same code which works when using straight OLE2 (and not the webutil client_ version)?
Regards
Grant Ronald
Oracle Product Management
Similar Messages
-
Not able to fetch updated data using jdbc and oracle 10g
Whenever i m updating the data and fetching the same record after updating i m not able to get the fresh/new updated data , old record is fetched every time, but when i checked in database the record gets updated successfully , even if i fire the query two times after 10 seconds using Thread.sleep even then problem persist.
Please help me out!!!!!!!!
Implementation has been stucked up!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :(Well its okWhat is OK? Your stuff working now?
i m doing the same thing Apparently not.
please go thru the below code fragment:
code for Update :::
DataAccessBean1 partsHistoryDataAccessBean = new
DataAccessBean1(context);
partsHistoryDataAccessBean.setData(data);
partsHistoryDataAccessBean.update();
After Updating i m forwading it to the other servletForwarding what? Why do you need another servlet? Just do the query, put the new data into the response object, and return.
According to your assumption i should get the updated
data on the other screen but Nope, you don't understand what I'm saying.
% -
Hi all,
I need to upload a file from a J2ME device to a remote server using a servlet
I am uploading an image ..and in the servlet i get the size of the file but i am not able to write to that file...please see code below...any help would be great.
Thanks in advance
StringBuffer bufferBody=new StringBuffer();
String line="";
byte[] data = new byte[79872000];
int cnt=0;
try
BufferedReader body=request.getReader();
while ((line = body.readLine()) != null) {
bufferBody.append(line);
cnt++;
data = bufferBody.toString().getBytes();
System.out.println("data received:"+data+"data length:"+data.length+"lines"+cnt);
String newFileName = "/home/aztec/pic2.jpg";
//data="hi".getBytes();
FileOutputStream imageOutput = new FileOutputStream(new File(newFileName));
imageOutput.write(data, 0, data.length);
imageOutput.close();
System.out.println("Please find image in " + newFileName);
} catch(Exception ex) {
System.out.println("Exception: " + ex);
ex.printStackTrace();
}And don't read entire files into memory, especially in a memory-constrained J2ME device. Read and write a 4k chunk at a time.
-
Not able to change the password using FNDCPASS
I am not able to change password using FNDCPASS. I am getting follwoing error while executing following command with APPLMGR user ( before that I have source the .env file ) (OS-Linux)
[applmgr@ora11 /]$ FNDCPASS apps/apps 0 Y system/manager SYSTEM APPLSYS WELCOME
Log filename : L2741743.log
Report filename : O2741743.out
APP-FND-01630: Cannot open file L2741743.log for appending
Cause: FDPFOP encountered an error when attempting to open file L2741743.log for appending.
Action: Verify that the filename is correct and that the environment variables controlling that filename are correct.
Action: If the file is opened in read mode, check that the file exists. Check that you have privileges to read the file in the file directory. Contact your system administrator to obtain read privileges.
Action: If the file is opened in write or append mode, check that you have privileges to create and write files in the file directory. Contact your system administrator to obtain create and write privileges.
Can some one pls guide me on thisDuplicate post-
Not able to change the password using FNDCPASS
Please post only once.
Thanks, -
Not able to update the project using 'BAPI_PROJECT_MAINTAIN'.
I want to create a project , with reference to an already existing project.
I am using 'BAPI_PROJECT_GETINFO' to get the data of the existing project.
The bapi gives the following:
1) e_project_definition.
2) e_wbs_element_table.
3) e_wbs_hierarchie_table
I am passing the u2018e_project_definitionu2019 to 'BAPI_PROJECTDEF_CREATE' to create project.The project is created successfully.
But I am not able to update the project with u2018e_wbs_element_tableu2019
and u2018e_wbs_hierarchie_tableu2019. I am using 'BAPI_PROJECT_MAINTAIN' to update the project.
The program is not giving an error, but it is also not updating the E_WBS_ELEMENT_TABLE and E_WBS_HIERARCHIE_TABLE.
I am attaching the code below.
*& Report ZTEST_PC.
DATA: project_definition TYPE bapipr-project_definition,
with_activities TYPE bapipr-with_activities,
with_milestones TYPE bapipr-with_milestones,
with_subtree TYPE bapipr-with_subtree,
e_project_definition TYPE bapi_project_definition_ex,
return TYPE bapireturn1.
DATA: i_wbs_element_table TYPE TABLE OF bapi_wbs_elements,
e_wbs_element_table TYPE TABLE OF bapi_wbs_element_exp,
e_wbs_milestone_table TYPE TABLE OF bapi_wbs_milestone_exp,
e_wbs_hierarchie_table TYPE TABLE OF bapi_wbs_hierarchie,
e_activity_table TYPE TABLE OF bapi_network_activity_exp,
e_message_table TYPE TABLE OF bapi_meth_message.
DATA: wa_wbs_element_table TYPE bapi_wbs_element_exp,
wa_wbs_hierarchie_table TYPE bapi_wbs_hierarchie.
DATA: l_new_proj_no TYPE prpss-posid.
DATA: l_project_definition TYPE bapi_project_definition.
DATA: l_project_definition_upd TYPE bapi_project_definition_up.
DATA: l_project_definition_stru TYPE bapi_project_definition.
DATA :l_pspnr TYPE ps_intnr,
l_pspid TYPE ps_pspid,
l_pro_def(9) TYPE c.
DATA :l_proj TYPE proj.
DATA :l_len TYPE i VALUE '0'.
DATA: lt_dd03l TYPE TABLE OF dd03l,
ls_dd03l TYPE dd03l.
DATA: fieldname(50), fieldname1(50) TYPE c.
DATA: p_ddic_name(40), struc(40), fun_struc(50) TYPE c.
FIELD-SYMBOLS: <struc>, <c>, <sc>, <def_field> TYPE any.
DATA : i_method_project TYPE TABLE OF bapi_method_project,
wa_method_project TYPE bapi_method_project.
DATA : l_index TYPE bapi_method_project-refnumber.
DATA : it_wbs_element_table TYPE TABLE OF bapi_wbs_element,
it_wbs_hierarchie_table TYPE TABLE OF bapi_wbs_hierarchie.
DATA : wl_wbs_element_table TYPE bapi_wbs_element,
wl_wbs_hierarchie_table TYPE bapi_wbs_hierarchie.
DATA : l_wbs_element_table_update TYPE bapi_wbs_element_update.
DATA : i_wbs_element_table_update TYPE TABLE OF bapi_wbs_element_update.
Get the project info of the Project 'C01.10995'
CALL FUNCTION 'CONVERSION_EXIT_ABPSN_INPUT'
EXPORTING
input = 'C01.10995'
IMPORTING
output = project_definition.
CALL FUNCTION 'BAPI_PROJECT_GETINFO'
EXPORTING
project_definition = project_definition
IMPORTING
e_project_definition = e_project_definition
return = return
TABLES
i_wbs_element_table = i_wbs_element_table
e_wbs_element_table = e_wbs_element_table
e_wbs_milestone_table = e_wbs_milestone_table
e_wbs_hierarchie_table = e_wbs_hierarchie_table
e_activity_table = e_activity_table
e_message_table = e_message_table.
Automate the process the process to get the next number for the func module 'CN_SUCHE_FREIE_NUMMER'.
CLEAR : l_pspnr, l_pspnr, l_pspid, l_pro_def.
SELECT MAX( pspnr ) FROM proj INTO l_pspnr.
SELECT SINGLE * FROM proj INTO l_proj WHERE pspnr EQ l_pspnr.
l_pspid = l_proj-pspid.
CALL FUNCTION 'CONVERSION_EXIT_ABPSN_OUTPUT'
EXPORTING
input = l_pspid
IMPORTING
output = l_pspid.
l_pro_def = l_pspid+4(5) + 1.
CONDENSE l_pro_def.
CONCATENATE 'C01.' l_pro_def INTO l_pspid .
function module to generate the nect free number between the given range.
CALL FUNCTION 'CN_SUCHE_FREIE_NUMMER'
EXPORTING
search_imp = '2'
prps_s_imp = l_pspid
prps_e_imp = 'C01.29999'
no_dialog = 'X'
IMPORTING
prps_exp = l_new_proj_no.
IF sy-subrc <> 0.
EXIT.
ENDIF.
Update the fields of 'l_project_definition_upd' as 'X' for the fields which has values in 'E_PROJECT_DEFINITION'.
Get the New Project Number.
MOVE-CORRESPONDING e_project_definition TO l_project_definition.
l_project_definition-project_definition = l_project_definition-project_definition+0(3).
l_new_proj_no = l_new_proj_no+4(5).
CONCATENATE l_project_definition-project_definition '.' l_new_proj_no INTO l_project_definition-project_definition.
TRANSLATE l_project_definition-project_definition TO UPPER CASE.
MOVE-CORRESPONDING l_project_definition TO l_project_definition_stru.
Create the New project with the New project Number.
CALL FUNCTION 'BAPI_PROJECTDEF_CREATE'
EXPORTING
project_definition_stru = l_project_definition_stru.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = ' '.
Populate internal table i_method_project for the bapi_project_maintain func module.
CLEAR : wa_wbs_element_table,wl_wbs_element_table,wa_wbs_hierarchie_table,
wl_wbs_hierarchie_table, it_wbs_element_table, it_wbs_hierarchie_table.
CLEAR : wa_method_project, i_method_project, l_index .
l_index = 0.
LOOP AT e_wbs_element_table INTO wa_wbs_element_table.
MOVE-CORRESPONDING wa_wbs_element_table TO wl_wbs_element_table .
APPEND wl_wbs_element_table TO it_wbs_element_table .
wa_method_project-objecttype = 'WBS_ELEMENT'.
wa_method_project-method = 'CREATE'.
wa_method_project-objectkey = wa_wbs_element_table-wbs_element.
l_len = strlen( wa_wbs_element_table-wbs_element ).
Setting Levels as reference number.
CASE l_len.
WHEN '9'.
l_index = 1.
WHEN '12'.
l_index = 2.
WHEN '15'.
l_index = 3.
WHEN '18'.
l_index = 4.
ENDCASE.
wa_method_project-refnumber = l_index .
TRANSLATE wa_method_project-objectkey TO UPPER CASE.
APPEND wa_method_project TO i_method_project.
CLEAR :wa_method_project, l_index.
ENDLOOP.
l_index = l_index + 1.
wa_method_project-refnumber = ' '. "l_index .
wa_method_project-objecttype = ' '. "'WBS_ELEMENT'.
wa_method_project-method = 'SAVE'.
wa_method_project-objectkey = ' '.
APPEND wa_method_project TO i_method_project.
CLEAR wa_method_project.
LOOP AT e_wbs_hierarchie_table INTO wa_wbs_hierarchie_table.
MOVE-CORRESPONDING wa_wbs_hierarchie_table TO wl_wbs_hierarchie_table.
APPEND wl_wbs_hierarchie_table TO it_wbs_hierarchie_table.
ENDLOOP.
Update the fields of 'l_project_definition_upd' as 'X' for the fields which has values in 'E_PROJECT_DEFINITION' respectively.
CLEAR : l_project_definition_upd.
p_ddic_name = 'BAPI_PROJECT_DEFINITION_UP'.
struc = 'l_project_definition_upd'.
fun_struc = 'E_PROJECT_DEFINITION'.
TRANSLATE: p_ddic_name TO UPPER CASE,
struc TO UPPER CASE.
SELECT * FROM dd03l INTO TABLE lt_dd03l WHERE tabname = p_ddic_name.
LOOP AT lt_dd03l INTO ls_dd03l.
ASSIGN ls_dd03l-fieldname TO <c>.
fieldname = ls_dd03l-fieldname .
CONCATENATE fun_struc '-' fieldname INTO fieldname.
ASSIGN (struc) TO <struc>.
ASSIGN COMPONENT <c> OF STRUCTURE <struc> TO <sc>.
ASSIGN (fieldname) TO <def_field>.
IF NOT <def_field> IS INITIAL .
<sc> = 'X'.
ENDIF.
ENDLOOP.
Update the fields of 'l_wbs_element_table_update' as 'X' for the fields which has values in 'e_wbs_element_table' respectively.
READ TABLE e_wbs_element_table INTO wa_wbs_element_table INDEX '1'.
CLEAR : l_wbs_element_table_update, fieldname1, p_ddic_name, struc, fun_struc .
p_ddic_name = 'BAPI_WBS_ELEMENT_UPDATE'.
struc = 'l_wbs_element_table_update'.
fun_struc = 'WA_WBS_ELEMENT_TABLE'.
TRANSLATE: p_ddic_name TO UPPER CASE,
struc TO UPPER CASE.
SELECT * FROM dd03l INTO TABLE lt_dd03l WHERE tabname = p_ddic_name.
LOOP AT lt_dd03l INTO ls_dd03l.
ASSIGN ls_dd03l-fieldname TO <c>.
fieldname = ls_dd03l-fieldname .
CONCATENATE fun_struc '-' fieldname INTO fieldname.
ASSIGN (struc) TO <struc>.
ASSIGN COMPONENT <c> OF STRUCTURE <struc> TO <sc>.
ASSIGN (fieldname) TO <def_field>.
IF NOT <def_field> IS INITIAL .
<sc> = 'X'.
ENDIF.
ENDLOOP.
Append the value of l_wbs_element_table_update TO the table i_wbs_element_table_update for Bapi_project_maintain.
CLEAR i_wbs_element_table_update.
APPEND l_wbs_element_table_update TO i_wbs_element_table_update.
CALL FUNCTION 'BAPI_PROJECT_MAINTAIN'
EXPORTING
i_project_definition = l_project_definition
i_project_definition_upd = l_project_definition_upd
TABLES
i_method_project = i_method_project
i_wbs_element_table_update = i_wbs_element_table_update
i_wbs_element_table = it_wbs_element_table.
i_wbs_hierarchie_table = it_wbs_hierarchie_table.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = ' '.
Please help me to solve the issue.I am not sure why it is not working?? Try for any other alternate function modules.
But i see one issue with your coding, always check the return table message type and use commit work, instead of sy-subrc check. This fails for BAPI's -
my Numbers file sent to somebody. He is not able to open in Excel can anybody help to solve this problem?
Numbers files are not compatible with MS Excel. To share a Numbers file with Excel you need to export you Numbers file in MS Excel format. To do this:
1) Open you Numbers document
2) select the menu item "File > Export..."
3) select "Excel" for the target output
4) click next and select where to save the file.
5) email the file you saved -
Certen user is not able to create the sc using sepecific vendor
Hi,
User is not able to create the SC entering specific vendor .
This vendor is in maintained in SRM for one pur.org (I have checked in PPOMA_BBP).
Then why he is not able to creating the sc using this Vendorwhether user is belong to same region of the Vendor or different. Is there any enhancements you have like that.
Please check those things.
Hope this will help.
Thanks
Venkatesh P -
I am not able to print double side using HP 2015dn printer using imac
I am not able to print double side using HP 2015dn printer using imac.
I found this information on HP site, but the article was quite old. May still be relevant:
1. Create a multi page document, or something that is more than one page.
2. Go to File/Page Setup.
3. Ensure the printer is listed in the Format for menu.
4. Click OK.
5. Go to File/Print but do not print yet.
6. Change the Copies and Pages menu to 'Layout'.
7. The Two-Sided option will be selectable only if the P2015 is listed in the Printer menu at the top of the print dialogue box.
8. Once you have chosen Long-edged binding, for example, click Print. -
not able to see ikm oracle incremental update and ikm oracle slowly changing dimensions under PHYSCIAL tab in odi 12c
But i'm able to see other IKM's please help me, how can i see themNope, It has not been altered.
COMPONENT NAME: LKM Oracle to Oracle (datapump)
COMPONENT VERSION: 11.1.2.3
AUTHOR: Oracle
COMPATIBILITY: ODI 11.1.2 and above
Description:
- Loading Knowledge Module
- Loads data from an Oracle Server to an Oracle Server using external tables in the datapump format.
- This module is recommended when developing interfaces between two Oracle servers when DBLINK is not an option.
- An External table definition is created on the source and target servers.
- When using this module on a journalized source table, the Journaling table is first updated to flag the records consumed and then cleaned from these records at the end of the interface. -
Not able to convert string attribute to number and date please help me out
not able to convert string attribute to number and date attribute. While using string to date conversion it shows result as failure.As I am reading from a text file. please help me out
Hi,
You need to provide an example value that's failing and the date formats in the reference data you're using. It's more than likely you don't have the correct format in your ref data.
regards,
Nick -
Not able to edit assets in Illustrator/Photoshop and save over existing assets in Edge animation
Not able to edit assets in Illustrator/Photoshop and save over existing assets in Edge animation to update image changes. Has Adobe changed this capability with new releases? Does this mean to update an asset on the Edge animation timeline, you have to copy and paste all the animations of that old asset over to the new imported asset?
Hi, CamShazam-
You should be able to save over existing assets in the images/ folder, then close and reopen the file. The other option is to save your assets and then use the swap image option in the properties panel. Is this what you're talking about? Thanks,
-Elaine -
Not able to do settings for Resource Files and Source Files (Indesign CS4 )
Hi,
I am new to Indesign Plugin Development .
I want to build the sample sdk examples from Indesign SDK(CS4) for windows .
Also I am not able to build project developed using Dollyxs. Its
giving error as PRJ0003 : Error spawning 'cmd.exe' while I am building it.
I have no idea abt settings for Project->Property for Resource and all
other files.
Can anybody tell what are the settings to be made at Project ->Property
dialog for all files.
Thanks and Regards,
Ravi SharmaI have the same problem - any update on this?
Tom -
i am not able to varify my apple id account , and i'm no geting any email varificaion message on my email , kindly please help me
Sir, your Apple ID can be used as an iCloud account as well. They are both the same thing.
You can learn more from --> Set up your Apple ID for iCloud and iTunes - Apple Support -
i am not able to install update or remove itunes and install newer versions,
its stops installing and a windows error is shown
i e :: windows installer service could not be accessed , this could occur if you are running windows installer in safe mode
or windows installer service is not correctly installed
the same error happens if i try to uninstall the itunes from the control panel- remove programmes option
im using windows 7 home basic 64 bit version
this eroor is not happening with any other programmes..
can someone tell me how to solve this issue
thanx
tusharReinstalling iTunes is really daunting task. See
http://www.apple.com/support/iphone/assistant/itunes/#section_6 -
I am not able to login to my facebook account and error message reads "This web site does not supply ownership information." Please help
only title bar opens and nothing else....please helpNormally, when you connect via http, the browser doesn't check for site identity, so I don't understand what's happening there.
Do you have any security-related add-ons that force popular sites to use a secure connection, or claim to provide anonymous browsing?
Were you making the connection on your own network or on a public network (e.g., school, coffee shop)? If it was a public network, maybe the error indicates that your traffic was being intercepted???
Without hands on, this is a tough one to diagnose.
Maybe you are looking for
-
Reader V.11 crashes after a few seconds
I completed the license agreement and when I open it, the program freezes and closes after I try to open reader itself or a .pdf. I am running the atrocity referred to as Windows 8. Any suggestions, many advance thanks.
-
How do I fix this? Dialog boxes won't open completely and competion boxes don't work.
I'm using a Mac Book Air and OS X Lion 10.7.5. Firefox has been hanging up periodically and recovers after closing and re-opening, but the the frequency of hangups has been increasing. All other programs operate correctly and don't hang up. This also
-
AR/AP & SALES for period CALCULATION on top of 0FIAR_C03/0FIAP_C03
hi, i want to create DSO/DPO report on top of 0FIAR_C03/0FIAP_C03 line item cube .so please tell me in detail on how to calculate account recievable/account payable & sales for the period calculation by just having credit and debit as keyfigures.
-
If I enable alarms in iCal preferences, the iCalHelper process spins itself into oblivion at 100% CPU until it crashes every time it runs. I have tried deleting the plist files relating to iCal and backing up/deleting/restoring my calendars but to to
-
So, going along and doing some editing by creating virtual copies and now new copies I make aren't showing up. It stopped doing that and now it's doing it again. I've accidentally made six virtual copies, then it stacked them together but wouldn't un