Execute Excel from ITS
I'm trying to execute Excel from a ITS transaction using the GUI_EXEC, GUI_RUN or WS_EXECUTE functions I get a 'Select Program' dialog box from windows. I then have to find and select 'excel.exe' for it to work. Is there anyway to avoid the windows dialog box? It works find from SAPGUI.
Here's my code:
data: PATHNAME LIKE SOXPC-PATH.
Check where the Excel is
CALL FUNCTION 'SO_PROGNAME_GET_WITH_PATH'
EXPORTING
DOCTYPE = 'XLS'
IMPORTING
PATHNAME = PATHNAME
EXCEPTIONS
OTHERS = 1.
Call Excel
CALL FUNCTION 'WS_EXECUTE'
EXPORTING
PROGRAM = PATHNAME
COMMANDLINE = 'S:\0004.xls'
INFORM = 'X'
EXCEPTIONS
OTHERS = 1.
Thanks,
Jaed
If you wanted to role the execookie.txt file out to your user community, assuming they all use Internet Explorer, you could role a file which lets IE determine which application to launch. The following file worked for me:
TXT
c:\Program Files\Internet Explorer\iexplore.exe
JPG
c:\Program Files\Internet Explorer\iexplore.exe
JPEG
c:\Program Files\Internet Explorer\iexplore.exe
GIF
c:\Program Files\Internet Explorer\iexplore.exe
DOC
c:\Program Files\Internet Explorer\iexplore.exe
BMP
c:\Program Files\Internet Explorer\iexplore.exe
PDF
c:\Program Files\Internet Explorer\iexplore.exe
TIF
c:\Program Files\Internet Explorer\iexplore.exe
PPT
c:\Program Files\Internet Explorer\iexplore.exe
PPS
c:\Program Files\Internet Explorer\iexplore.exe
XLS
c:\Program Files\Internet Explorer\iexplore.exe
Similar Messages
-
Download custom generated reports in Excel from ITS
Hi All,
We have generated some custom reports and have used ALV reporting. Now from the GUI we are able to download the report in excel but from the ITS this functionality is not working,
Has anybody idea how to achieve this for the custom reports.
Thanks,
SmitaHi Luciano,
Thanks for your reply. I am really lost with your question. Before we were not able to download the standard SAP report and then we upgraded our Java Virtual Machine to V1.4 and its working for the standard report.
Now my problem is that I am not able to download it from the custom generated report.
As soon as I am clicking on export to local file the report screen is getting blank and not allowing for any further action.
Any clue?
Thanks,
Smita -
I was executing the following code in Excel 2013 that is linked to a button I use to add multiple rows in a chosen section of a worksheet
Sub Add_Rows_dc()
Sheet53.Unprotect ("xxx")
X = Range("C1").Value + 1 'Section Counter
Y = ListSheet.Range("I" & X).Value 'Existing rows counter
Z = ListSheet.Range("H" & X).Value 'Position counter
Righe = InputBox("How many rows would you like to add?", , "1")
If Righe < 1 Then GoTo err ' test for invalid row number
RigheSheet.Rows(X).Copy
Rows(Z - 1 & ":" & Righe + Z - 2).Insert Shift:=xlDown
GoTo Fine
err:
Mess = MsgBox("PLEASE INSERT A VALID NUMBER OF ROWS", vbCritical)
Fine:
'Formulas update
Z = ListSheet.Range("H" & X).Value 'Position counter update
Range("U" & Z - Righe - 2 & ":AF" & Z - 2).FillDown
Sheet53.Protect "xxx", , , , , True
End Sub
From time to time it returns me the error "2147417848 The object invoked has disconnected from its clients" and the debug point out the line
Rows(Z - 1 & ":" & Righe + Z - 2).Insert Shift:=xlDown
I cannot find any specific reason due to the fact that the error seems randomic, sometimes the code is perfectly executed, sometimes not.
I wrote this piece of code in Excel 2010 and never encountered such problem before reusing it in Excel 2013
Has someone an insight or a suggestion?
Thank you very muchRe: strange error
Try it this way...
(might work, might not)
Sub Add_Rows_dc_R1()
Dim X As Double
Dim Y As Double
Dim Z As Double
Dim Righe As Variant
Dim Mess As Long
Sheet53.Unprotect ("xxx")
X = Range("C1").Value + 1 'Section Counter
Y = ListSheet.Range("I" & X).Value 'Existing rows counter
Z = ListSheet.Range("H" & X).Value 'Position counter
Righe = InputBox("How many rows would you like to add?", , "1")
If Righe < 1 Then GoTo errX ' test for invalid row number
RigheSheet.Rows(X).Copy
Rows(Z - 1 & ":" & Righe + Z - 2).Insert Shift:=xlDown
GoTo Fine
Fine:
'Formulas update
Z = ListSheet.Range("H" & X).Value 'Position counter update
Range("U" & Z - Righe - 2 & ":AF" & Z - 2).FillDown
Sheet53.Protect "xxx", , , , , True
Exit Sub
errX:
Mess = MsgBox("PLEASE INSERT A VALID NUMBER OF ROWS", vbCritical)
End Sub
Jim Cone
Portland, Oregon USA
free & commercial excel programs (n/a xl2013)
https://jumpshare.com/b/O5FC6LaBQ6U3UPXjOmX2 -
When the PC System timing runs as per normal, reaches 0000hrs - a new date. How to Auto re-execute the VI from its first sequence order?
Duplicate Post
-
Uploading excel files from ITS to sap
Hi all,
I want to upload excel files from ITS to sap system ECC 6.0 .I am using standalone ITS.Someone please help me find a solution for this.What are the steps involved in it?
Thanks in advance
ShinuHi Shinu,
this seems to be a misunderstanding. The ITS does not have excel files.
Did you mean to say that you have an application which allows to upload
files? This application might work using the webgui service of the ITS.
Try it out!
best regards
Tobias -
Executing Excel Macros from SAP
Hi all Experts,
I have created a program which tranfers data from different internal tables into Different Worksheets of a single workbook.
Now, Can some one please tell me how to Execute macros from SAP.
Regards,
AJTo execute an Excel macro follow these steps.
1. Create macro inside Excel Workbook where you transferred your information.
2. Use following instruction to execute the desired macro you create:
DATA: EXCEL TYPE OLE2_OBJECT.
CREATE OBJECT EXCEL 'Excel.Application'.
CALL METHOD OF EXCEL 'Run' EXPORTING #1 = 'WRITE_SHEET_CELL'
#2 = 'VALUE1'
#3 = 'VALUE2'
#4 = 'VALUE3'.
In previous example, macro WRITE_SHEET_CELL was created first. The macro name must be in uppercase.
Regards.
Rafael Rojas. -
Exporting to Excel from Aria People Search
Is it possible to export to Excel from Aria People Search.
I would like to output the Org Chart (built in) and the Tree (I created) to an Excel file.
Does anyone know how to do this?
Thanks,
TomHi,
If you are using 10g, then OLE2 is supported. However, it will be executed in the App Server Machine.
If you want to do the operation in the Client machine (as how it was done in the Client / Server), you need to use Client_OLE (Which is part of WebUtil).
Look at
http://www.oracle.com/technology/products/forms/htdocs/webutil/webutil.htm
for more details on WebUtil.
HTH.
Regards,
Arun -
"Lightroom encountered and error when reading from its preview cache and needs to quit"
I keep receiving this error every time I open LR, "Lightroom encountered and error when reading from its preview cache and needs to quit" and the app won't open. It said LR would try and fix this error next time I opened it but the error remains. I tried uninstalled and installing the app and the error remains.
Any Ideas here? Is there another app that may be telling it where to look for the cache and it no longer there? I was using a ramdisk for a bit but ditched it. Not sure if that has something to do with it but it seems suspect.
Your thoughts?
--Kenny Brandon WilsonTalked to Adobe support this morning, this is their response in case anyone else is looking for help. I'm running a Windows 7 box, LR 5.6.
Gokul: Click on start and type %appdata%, then open roaming folder.
Edward: ok
Gokul: Open Adobe folder.
Gokul: Open Lightroom folder.
Gokul: Open Lightroom folder> Preferences.
Edward: ok
Gokul: Rename Lightroom 5 Preferences.agprefs file as Lightroom 5 Preferences.agprefsOLD.
Edward: OK
Gokul: Please check if you can launch Lightroom without any error.
Edward: it shows me a welcome screen and is asking me to select my country
Edward: aka, register the software
Gokul: You can skip and launch it.
Edward: LR catalog not found
Gokul: Please select the catalog.
Edward: my original catalog?
Gokul: Yes.
Edward: testing integrity of catalog
Edward: loaded just fine
Gokul: Okay.
Gokul: Please check if you can re-launch it again.
Edward: yes, it worked!
Gokul: Excellent!
Gokul: Since your preferences were corrupted you were facing issue so we renamed the preferences file to reset it.
Edward: aha....ok
All of my import/export presets were intact along with develop user presets. I'm happy as a clam for my $10/month! -
Issues on exporting the report to Excel from full client BO 5.1
Hi,
I am facing a problem in exporting the BO report from Business Objects 5.1 to excel file. I am aware that there is no direct way to export the BO report to Excel from Business Objects(File--> save as to .txt file and then copy its data to excel )
When the export the BO report to excel file,I received two errors one over other
error1: Numeric data overflow (3349)
When I click OK button, second error received is like this
error2:export failed (dma0005)
I tried all options to fix this and also I looked for an dialog box " export to external file format " in Business Objects inorder to copy the report data to COPY TO DDE option but I didn't find any aforementioned dialog box
Please provide me the solution to fix the issues
Kind Regards,
SrinivasHi Denis,
Yes,all reports based on this particular universe have this problem
Are you telling me to isolate the object from the universe that is creating problems and then run the report ?
Also, I am unable to find the option from menu items in Full client BO 5.1 to open the dialog box with name " export to external file format ". Can you please tell me where I can find this?
Warm Regards,
Srinivas -
Error while exporting to excel from a JSP page on Win XP
Hi,
I have used the below code to output the content from jsp to excel file, its working fine until we noticed an error on computers with Windows XP installed. The application is working fine on Win 2k systems. Please help.
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-disposition", "attachment;filename=Report.xls");My problem was somewhat similar....
I got some help from...http://www.javaworld.com/javaworld/jw-10-2006/jw-1019-xmlexcel.html?page=1...
This is my code in servlet...
HSSFWorkbook wb = new HSSFWorkbook();
HSSFSheet spreadSheet = wb.createSheet("Users");
spreadSheet.setColumnWidth((short) 0, (short) (256 * 25));
spreadSheet.setColumnWidth((short) 1, (short) (256 * 25));
// Creating Rows
HSSFRow row = spreadSheet.createRow(0);
HSSFCell cell = row.createCell((short) 1);
cell.setCellValue("Year 2005");
cell = row.createCell((short) 2);
cell.setCellValue("Year 2004");
HSSFRow row1 = spreadSheet.createRow(1);
HSSFCellStyle cellStyle = wb.createCellStyle();
cellStyle.setBorderRight(HSSFCellStyle.BORDER_MEDIUM);
cellStyle.setBorderTop(HSSFCellStyle.BORDER_MEDIUM);
cellStyle.setBorderLeft(HSSFCellStyle.BORDER_MEDIUM);
cellStyle.setBorderBottom(HSSFCellStyle.BORDER_MEDIUM);
cell = row1.createCell((short) 0);
cell.setCellValue("Revenue ($)");
cell = row1.createCell((short) 1);
cell.setCellValue("25656");
cell = row1.createCell((short) 2);
cell.setCellValue("15457");
FileOutputStream output = new FileOutputStream(new File("/tmp/Users.xls"));
response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition", "attachment;filename=Users.xls");
ServletOutputStream out = response.getOutputStream();
wb.write(output);
output.flush();
output.close();
forward = null;
In firefox i get the download dialog box but not able to open in from there,i need to save it and then open. In IE i dont get the dialog box instead the excell open inside the browser......Please help me to open a excel sheet onclick on a link "Export to excel" in jsp......
Thanks in advance... -
Issue with Data download to excel from ALV
Hi,
I am trying to download data to excel from ALV.
The number of records are 26000.
When I am trying to download I am getting an error displaying a pop up saying that
problems came up in the following areas during the load
TABLE
The log displayed is not clear.
I need to know the limitations while downloading to excel... I tried in SDN but of no use. I am using office 2007.
What is the max downloading limit(MB)
What must be the Length of line that can be downloaded.
RegardsHi ,
First check whether your ALV grid OUTPUT is Consistent or Not .
if there are any inconsistency then you need to rectify that .
for Checking COnsistency / Inconsistency .do following steps
1) execute ALV report
2) Press Shift+Mouse Right Button (Twice) in blank area of report
3) you will get result whether ALV is good or not .
regards
Deepak. -
I execute my progrem its goes to infinite loop?
Hi frnds,
I execute my program its goes to infinite loop? How can i stop that program, before goes to dump?why don't you put a break point before the loop and just check why it is not finishing up. u can always set conditions when to exit from such loops when required.
Loop ...
if some cond
exit.
endif
endloop. -
Security message on exporting grid to excel from webpage
I am exporting data to excel from grid on a webpage. I have written following code:
gv.DataSource = resultlist;
gv.DataBind();
Response.ClearContent();
Response.AddHeader("content-disposition", "attachment; filename=Test.xls");
Response.ContentType = "application/excel";
//Ccreate string writer object and pass it to HtmlTextWriter object
StringWriter sw = new StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(sw);
gv.RenderControl(htw);
Response.Write(sw.ToString());
Response.End();
Code is executing correctly. But when I open this excel, it is giving me a warning message which says, "The file you are trying to open, "Test.xls", is in a different format than specified by the file extension. Verify that the file is not
corrupted and is from a trusted source before opening the file. Do you want to open the file now?"
File gets opened when I select "Yes" on this message box, but I don't want to get this message box. Is there any work-around to get rid of it? When I selected "Save As" option of this file, I found that default type of the file was Webpage.
How can we get this default type as "xls or xlsx"? I think this problem will be resolved when we will get this default type as "xls or xlsx".Hi Ajinkya,
Please post in ASP.NET forums:
http://forums.asp.net/
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Any method to Import & Export to Excel from Client Side
Hi,
Is there any method to Import and Export to Excel from the Client side. I have one procedure to export to Excel , but the excel file will be opened in the Application Server only, even if it executed from the client side. Also this procedure will not work if OLE2 chnaged CLIENT_OLE2. I am writing my procedure, Is there any idea to get it in the client side.
PROCEDURE pr_Forms_to_Excel(p_block_name IN VARCHAR2 DEFAULT NAME_IN('system.current_block')) IS
-- Declare the OLE objects
application OLE2.OBJ_TYPE;
workbooks OLE2.OBJ_TYPE;
workbook OLE2.OBJ_TYPE;
worksheets OLE2.OBJ_TYPE;
worksheet OLE2.OBJ_TYPE;
cell OLE2.OBJ_TYPE;
range OLE2.OBJ_TYPE;
range_col OLE2.OBJ_TYPE;
-- Declare handles to OLE argument lists
args OLE2.LIST_TYPE;
-- Declare form and block items
form_name VARCHAR2(100);
f_block VARCHAR2(100);
l_block VARCHAR2(100);
f_item VARCHAR2(100);
l_item VARCHAR2(100);
cur_block VARCHAR2(100) := NAME_IN('system.current_block');
cur_item VARCHAR2(100) := NAME_IN('system.current_item');
cur_record VARCHAR2(100) := NAME_IN('system.cursor_record');
item_name VARCHAR2(100);
baslik VARCHAR2(100);
row_n NUMBER;
col_n NUMBER;
filename VARCHAR2(100);
ExcelFontId OLE2.list_type;
BEGIN
-- Start Excel
application:=OLE2.CREATE_OBJ('Excel.Application');
OLE2.SET_PROPERTY(application, 'Visible', 'True');
-- Return object handle to the Workbooks collection
workbooks:=OLE2.GET_OBJ_PROPERTY(application, 'Workbooks');
-- Add a new Workbook object to the Workbooks collection
workbook:=OLE2.GET_OBJ_PROPERTY(workbooks,'Add');
-- Return object handle to the Worksheets collection for the Workbook
worksheets:=OLE2.GET_OBJ_PROPERTY(workbook, 'Worksheets');
-- Get the first Worksheet in the Worksheets collection
-- worksheet:=OLE2.GET_OBJ_PROPERTY(worksheets,'Add');
args:=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 1);
worksheet:=OLE2.GET_OBJ_PROPERTY(worksheets,'Item',args);
OLE2.DESTROY_ARGLIST(args);
-- Return object handle to cell A1 on the new Worksheet
go_block(p_block_name);
baslik := get_block_property(p_block_name,FIRST_ITEM);
f_item := p_block_name||'.'||get_block_property(p_block_name,FIRST_ITEM);
l_item := p_block_name||'.'||get_block_property(p_block_name,LAST_ITEM);
first_record;
LOOP
item_name := f_item;
row_n := NAME_IN('SYSTEM.CURSOR_RECORD');
col_n := 1;
LOOP
IF get_item_property(item_name,ITEM_TYPE)<>'BUTTON' AND
get_item_property(item_name,VISIBLE)='TRUE'
THEN
-- Set first row with the item names
IF row_n=1 THEN
------updated by faisal-to give Bold font-----
--FOR k IN 1 .. 3 LOOP
args := OLE2.create_arglist;
OLE2.add_arg(args, 1);
OLE2.add_arg(args, col_n);
cell := OLE2.get_obj_property(worksheet, 'Cells', args);
OLE2.destroy_arglist(args);
--cell_value := OLE2.get_char_property(cell, 'Value');
ExcelFontId := OLE2.get_obj_property(Cell, 'Font');
OLE2.set_property(ExcelFontId, 'Bold', 'True');
--END LOOP;
baslik:=NVL(get_item_property(item_name,PROMPT_TEXT),baslik);
args:=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, row_n);
OLE2.ADD_ARG(args, col_n);
cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
OLE2.DESTROY_ARGLIST(args);
OLE2.SET_PROPERTY(cell, 'Value', baslik);
OLE2.RELEASE_OBJ(cell);
END IF;
-- Set other rows with the item values
args:=OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, row_n+1);
OLE2.ADD_ARG(args, col_n);
cell:=OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
OLE2.DESTROY_ARGLIST(args);
IF get_item_property(item_name,DATATYPE)<>'NUMBER' THEN
OLE2.SET_PROPERTY(cell, 'NumberFormat', '@');
END IF;
OLE2.SET_PROPERTY(cell, 'Value', name_in(item_name));
OLE2.RELEASE_OBJ(cell);
END IF;
IF item_name = l_item THEN
exit;
END IF;
baslik := get_item_property(item_name,NEXTITEM);
item_name := p_block_name||'.'||get_item_property(item_name,NEXTITEM);
col_n := col_n + 1;
END LOOP;
EXIT WHEN NAME_IN('system.last_record') = 'TRUE';
NEXT_RECORD;
END LOOP;
-- Autofit columns
range := OLE2.GET_OBJ_PROPERTY( worksheet,'UsedRange');
range_col := OLE2.GET_OBJ_PROPERTY( range,'Columns');
OLE2.INVOKE( range_col,'AutoFit' );
OLE2.RELEASE_OBJ( range );
OLE2.RELEASE_OBJ( range_col );
-- Get filename and path
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG( args, p_block_name );
OLE2.ADD_ARG( args,'Excel Workbooks (*.xls, *.xls');
filename := OLE2.INVOKE_CHAR( application,'GetSaveAsFilename',args );
OLE2.DESTROY_ARGLIST( args );
-- Save as worksheet
IF NVL(filename,'0')<>'0' THEN
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG( args,filename );
OLE2.INVOKE( worksheet,'SaveAs',args );
OLE2.DESTROY_ARGLIST( args );
END IF;
-- Close workbook
--OLE2.INVOKE( workbook ,'Close');
-- Release the OLE objects
OLE2.RELEASE_OBJ(worksheet);
OLE2.RELEASE_OBJ(worksheets);
OLE2.RELEASE_OBJ(workbook);
OLE2.RELEASE_OBJ(workbooks);
--OLE2.INVOKE(application, 'Quit');
OLE2.RELEASE_OBJ(application);
-- Focus to the original location
go_block(cur_block);
go_record(cur_record);
go_item(cur_block||'.'||cur_item);
END;
Thanks in advance.
Rizly FaisalAlternatively you could use OLE2 to do the bulk of the importing and exporting and then use the webutil file transfer functions to move the file to the client and then simply open the file there...That might be more efficient in terms of performance as well.
Regards
Grant -
Error -2146960888 when opening excel from labview using active x
attempting to open an instance of excel from labview using active x, I even tried using the "open excel and make visible.vi" found on this site. I get errors every time, Inserting a break right after the property node, I found that it does open excel with no active workbook. once the program runs to ompletion excel terminates. The error is on the line right after the property node executes.
http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3F15456A4E034080020E74861&p_node=DZ53003&p_submitted=N&p_rank=&p_answer=&p_source=External
Attachments:
XL97table.zip 29 KB
Maybe you are looking for
-
Update problem , getting iphone 4 out of recovery mode
How can i get my iphone 4 to work after recent update when I get this message' itunes has detected an iphone in recovery mode . you must restore this iphone before it can be used with itunes.' i have a itunes logo and usb display on screen and nothin
-
ITunes does not sync all my songs
I recently decided that it would be nice to have all my songs on my Android device as well as on my iPad & iPod, and to do that I needed to have all my songs synced with iTunes on my computer. I completed the update to version 11.3.0.54 but my librar
-
How can I see the organization of searched bookmarks?
I have bookmarks organized in folders and subfolders. When I search for a bookmark, the results are returned in a list. How can I find out which folder or subfolder the bookmark resides in? == Firefox version == 3.6.3
-
I am trying to buy panadora and it is saying my apple id has been disabled
I am trying to buy pandora and it is saying my apple id has been disabled. What does that mean?
-
ITunes Podcast Downloading RSS Feed
Hi, I'm trying to submit a podcast, but it keeps asking for an RSS feed. What is this? How do i figure out what to put in?