How to export data from report to excel using report 10g
Hi,
usnig report 10g, can we export the data from report to excel.
Regards
Randhir
Hi,
have a look at metalink note 209770.1: Getting Reports Ouput to MS Excel - Techniques and References
Regards
Rainer
Similar Messages
-
How to export data from webdynpro to Excel and start a Excel macro
Hello All
I want to export data displayed in the Web dynpro ALV into Excel. I have tried the ALV export function but my problem with it is when it does export to excel the data loses formatting and I have long text in columns which display with wrapping in ALV but when exported to excel it loses formatting.
So I want to define a custom button and when user presses on this button the excel export is called with a macro. Can you kindly share ideas how I can do this from a webdynpro.
Thanks
KarenHi friends!
I have followed the following:
http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417300)ID1487994050DB10407586481486749551End?blog=/pub/wlg/5522
...in order to create standard ALV with Export to Excel.
However what is exported into excel is awful. It does not contain my data in nice columns... Instead it shows a lot of meta-data.
Please let me know what to do to kick the standard Export button in the correct direction.. that is...to have my nice table in same way in Excel, because that is my intention with "Export to excel"
Best reg
Henrik -
How to export data from a Oracle table to a delimited file?
I know how to load delimited file into a table, but how to export
data from a Oracle table to a delimited file?
Thanks in advance.Try looking at this link, it's long but there's three different solutions discussed in it. If you look at Barbara Boehmer's
solution in her posts in the link below you'll see that she's addressed your concerns with spool files.
Re: utl_smtp and triggers -
How to export data from a spread sheet which has multiple work sheets?
How to export data from a spread sheet which has multiple work sheets to a single text file with fixed length fields?
Hello s1,
saving them as CSV will not give a fixed legth output but, as the naming says, a Character Separated Value file.
Regards
Marcus -
Exporting Data from Essbase to Excel
Hi All,
We are using classic planning application developed in Hyperion 11.1.2.2.
Is there any way that we can export data from Essbase to Excel (Please note that i don't want to do it on server machine where essbase is installed, instead i want it on any client PC which is accessing Essbase)there are many ways you can do that, Through Excel Add-in,SmartView functions etc different.
It depends on the requirement , if you mean to say who Essbase Data then someone else should be able to answer this.
Thanks
Amith -
Export data from forms to excel
HI
In my application im trying to export data from forms to excel.Everything works fine.First of all im using get_file_name for selecttion of file and passing it to ole2 package as follows
FILENAME := GET_FILE_NAME(File_Filter=> 'XLS Files (*.xls)|*.xls|',dialog_type=>SAVE_FILE);
ARGS:=OLE2.CREATE_ARGLIST;
oLE2.ADD_ARG(ARGS,Filename);
OLE2.INVOKE(WORKSHEET,'SAVEAS',ARGS);
The problem is if i select an existing file the get_file_name itself raises one message ".....file already exists Replace an existing file?"
Similarly the excel also also raises the same message "".....file already exists Replace an existing file?".I want to suppress atleast one of them? Could anyone help for this problem?
appreciate ur help
THANKSLooks like...
ole2.set_property( ex_app, 'DisplayAlerts', false );
where "ex_app" variable Excel Application -
ex_app:= ole2.create_obj('Excel.Application');
and more Question:
When i close excel app - in process viewer i see "excel.exe"
ole2.release_obj don't work :( -
How to Export data from webdynpro using Jecxcel
Hi ,
Can anyone help me how to export data from web dynpro using Jexcel. kindly send me the related links.
ThanksHi Sandeep,
Have you refered in the blogs?
U can find may more document related to this.the below blog helps u in
Exporting Data from Web Dynpro in Different Formats Using Open Source (POI, JExcel, iText) APIu2019s.
https://www.sdn.sap.com/irj/sdn/index?rid=/library/uuid/b030e7fb-2662-2b10-0dab-c4aa52c3550b
Regards
Supraja -
How to read data from a router by using labview
I am a beginner labview. How to read data from a router by using labview ?
What kind of data are you trying to read?
Does the router behave like a webserver that you log into? If so, search the forums for threads discussing HTML. -
How to Export data from a Table to Excel using PL/SQL Code
Hi,
I need to export data from a table to the excel sheet using PL/SQL script.
could you pls provide with custom codes or sample procedures.
Bobbyhttp://asktom.oracle.com/pls/ask/f?p=4950:8:7947129213057862756::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:728625409049
-
How to export data from a Dynpro table to Excel file?
Hi
Here I go again. I read the post <b>Looking for example to export data from a DynPro table to Excel file</b> and put the code lines into a Web Dynpro Project where we need to export a dynpro table to Excel file but exactly at line 23 it doesn't recognize <b>workBook = new HSSFWorkbook();</b>
1 //Declare this in the end between the Begin others block.
2
3 private FileOutputStream out = null;
4 private HSSFWorkbook workBook = null;
5 private HSSFSheet hsSheet = null;
6 private HSSFRow row = null;
7 private HSSFCell cell = null;
8 private HSSFCellStyle cs = null;
9 private HSSFCellStyle cs1 = null;
10 private HSSFCellStyle cs2 = null;
11 private HSSFDataFormat dataFormat = null;
12 private HSSFFont f = null;
13 private HSSFFont f1 = null;
14
15 //Code to create the Excel.
16
17 public void onActionExportToExcel(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
18 {
19 //@@begin onActionExportToExcel(ServerEvent)
20 try
21 {
22 out = new FileOutputStream("C:/mydirectory/myfiles/testexcel.xls");
23 workBook = new HSSFWorkbook();
24 hsSheet = workBook.createSheet("My Sheet");
25 cs = workBook.createCellStyle();
26 cs1 = workBook.createCellStyle();
27 cs2 = workBook.createCellStyle();
28 dataFormat = workBook.createDataFormat();
29 f = workBook.createFont();
30 f1 = workBook.createFont();
31 f.setFontHeightInPoints((short) 12);
32 // make it blue
33 f.setColor( (short)HSSFFont.COLOR_NORMAL );
34 // make it bold
35 // arial is the default font
36 f.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
37
38 // set font 2 to 10 point type
39 f1.setFontHeightInPoints((short) 10);
40 // make it red
41 f1.setColor( (short)HSSFFont.COLOR_RED );
42 // make it bold
43 f1.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
44 f1.setStrikeout(true);
45 cs.setFont(f);
46 cs.setDataFormat(dataFormat.getFormat("#,##0.0"));
47
48 // set a thick border
49 cs2.setBorderBottom(cs2.BORDER_THICK);
50
51 // fill w fg fill color
52 cs2.setFillPattern((short) HSSFCellStyle.SOLID_FOREGROUND);
53 cs2.setFillBackgroundColor((short)HSSFCellStyle.SOLID_FOREGROUND);
54 // set the cell format to text see HSSFDataFormat for a full list
55 cs2.setDataFormat(HSSFDataFormat.getBuiltinFormat("text"));
56 cs2.setFont(f1);
57 cs2.setLocked(true);
58 cs2.setWrapText(true);
59 row = hsSheet.createRow(0);
60 hsSheet.createFreezePane(0,1,1,1);
61 for(int i=1; i<10;i++)
62 {
63 cell = row.createCell((short)i);
64 cell.setCellValue("Excel Column "+i);
65 cell.setCellStyle(cs2);
66 }
67 workBook.write(out);
68 out.close();
69
70 //Read the file that was created.
71
72 FileInputStream fin = new FileInputStream("C:/mydirectory/myfiles/testexcel.xls");
73 byte b[] = new byte[fin.available()];
74 fin.read(b,0,b.length);
75 fin.close();
76
77 wdContext.currentContextElement().setDataContent(b);
78 }
79 catch(Exception e)
80 {
81 wdComponentAPI.getComponent().getMessageManager().reportException("Exception while reading file "+e,true);
82 }
83 //@@end
84 }
I don't know why this happen? Any information I will appreciate it.
Thanks in advance!!!
Tokio Franco ChangAfter test the code lines appears this error stacktrace:
[code]
java.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbook
at com.sap.tc.webdynpro.progmodel.api.iwdcustomevent.ExportToExcel.onActionAct1(ExportToExcel.java:232)
at com.sap.tc.webdynpro.progmodel.api.iwdcustomevent.wdp.InternalExportToExcel.wdInvokeEventHandler(InternalExportToExcel.java:147)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
at com.sap.tc.webdynpro.progmodel.controller.Action.fire(Action.java:67)
at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleAction(WebDynproMainTask.java:101)
at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleActionEvent(WebDynproMainTask.java:304)
at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:649)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:252)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:55)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:392)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:345)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:323)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:865)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:240)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:159)
Thanks in advance!!!
Tokio Franco Chang
[/code] -
How to write data which i am reading from spectrum in excel using Report Generation toolkit.
Hello All,
I wrote code for reading data from Spectrum analyzer and also for writing in excel using report generation toolkit. When i run program values get read and excel sheet opens also but i cant see anything written in it.
So if anyone can help me in this i will be very gald. I am attaching screenshot of my program and also attaching .vi file. As i am using drivers you can see some of vi.
Thanking You,
Pallavi
Solved!
Go to Solution.
Attachments:
Channel_Power.jpg 123 KB
Channel Power_Toolkit.vi 64 KBHi Palavi,
you try to select a specific worksheet what is not existing, therefore just select "Channel Power" (and not Power Channel) and it should work for you.
Regards,
Tobias -
How to download data from spool to excel file
Hi,
I have requirement like....i need to download data from spool to excel file.
Please let me know the process how to download...
<removed by moderator>
<removed by moderator>
Thanks,
Khasimsa
Moderator message: please (re)search yourself before asking, do not assign priorities, do not offer re-ward
locked by: Thomas Zloch on Sep 8, 2010 1:18 PMHi try this way..
*FM called that returns the Spool Request Number data into and internal table
CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
EXPORTING
rqident = p_spool "Spool Request Number
first_line = 1
TABLES
buffer = it_spool_xls "Internal table that will have the Spool Request No data
EXCEPTIONS
no_such_job = 1
not_abap_list = 2
job_contains_no_data = 3
selection_empty = 4
no_permission = 5
can_not_access = 6
read_error = 7
OTHERS = 8.
*To convert the spool data into excel format
CALL FUNCTION 'SO_RAW_TO_RTF'
TABLES
objcont_old = it_spool_xls "Internal table having spool data
objcont_new = it_xls_spool. "Int table having Excel format data converted from Spool data
"call GUI down Load by passing it_xls_spool
Prabhudas -
How to download data from itab to Excel sheet..
Hi sap Experts,
I develop one report to download data from itab to excel sheet.I done it perfectly.
My doubt is in the excel sheet i need to put headings. and also at last i need to display total no.of Records.
Please help me how to do this.
Thanks in Advance....
Thanks and Regards
Siri.......................u can either use GUI_DOWNLOAD or the method below...just give a try
DATA:WK_string TYPE STRING.
DATA:Wk_EXT(4) TYPE C value '.xls'.
DATA:WK_path TYPE STRING.
DATA:wk_file_name type string.
data:wk_records type sy-tfill.
wk_file_name = 'Downloaded'.
describe table itab lines wk_records.
LOOP AT ITAB.
at first.
**Provide path
concatenate 'C:\' wk_file_name Wk_EXT into wk_path.
open dataset WK_path for output in text mode encoding default.
if sy-subrc 0.
write:'ERROR while opening dataset !!!!!!'.
EXIT.
endif.
CONDENSE wk_path.
**Heading Part
concatenate 'Part No' 'Description'
into wk_string separated by cl_abap_char_utilities=>horizontal_tab.
endat.
**Data ITAB
CONCATENATE ITAB-MATNR itab-maktx into wk_string
separated by cl_abap_char_utilities=>horizontal_tab.
transfer wk_string to WK_path.
at last.
clear wk_string.
Concatenate 'Records Passed:' wk_string into wk_string.
transfer wk_string to WK_path.
close dataset WK_path.
endat.
endloop. -
Export data from block to excel.
Hi
Does anybody know how I can export data from oracle forms to an excel worksheet. I need to provide a direct interface for a user where he fetches the data into the block and by just click a button the data from the block should go to an excel sheet.
Thanks in advance
-SamsamSomething along the following lines should help you in you are Client/Server. If you're on the Web then make sure you have WebUtil set up and add "CLIENT_" to all the OLE2 calls.
PROCEDURE P_EXCEL IS
application ole2.Obj_Type;
workbooks ole2.Obj_Type;
workbook ole2.Obj_Type;
worksheets ole2.Obj_Type;
worksheet ole2.Obj_Type;
args ole2.List_Type;
cell ole2.Obj_Type;
j INTEGER;
k INTEGER;
file_name_cl VARCHAR2(32767);
item_prompt VARCHAR2(32767);
user_cancel EXCEPTION;
BEGIN
-- open the java save file dialogue box
file_name_cl := GET_FILE_NAME('H:\', 'file_name.xls', 'XLS Files (*.xls)|*.xls|', NULL, SAVE_FILE, TRUE);
file_name_cl := SUBSTR(file_name_cl,1,LENGTH(file_name_cl));
IF file_name_cl IS NULL THEN
RAISE user_cancel;
END IF;
application := ole2.create_obj('Excel.Application');
workbooks := ole2.Get_Obj_Property(application, 'Workbooks');
workbook := ole2.Invoke_Obj(workbooks, 'Add');
worksheets := ole2.Get_Obj_Property(workbook, 'Worksheets');
worksheet := ole2.Invoke_Obj(worksheets, 'Add');
go_block('EXPORT_BLOCK');
first_record;
j:=1; /* Represents row number */
k:=1; /* Represemts column number */
/* Add the column headings using item prompts */
FOR k IN 1..10 /* Block has 10 visible columns */
LOOP
item_prompt := get_item_property(:SYSTEM.CURRENT_BLOCK||'.'||:SYSTEM.CURRENT_ITEM, prompt_text);
args:=ole2.create_arglist;
ole2.add_arg(args, j);
ole2.add_arg(args, k);
cell:=ole2.get_obj_property(worksheet, 'Cells', args);
ole2.destroy_arglist(args);
ole2.set_property(cell, 'Value', item_prompt);
ole2.release_obj(cell);
next_item;
END LOOP;
j:=j+1; /* Add to rowcount so that data won't overwrite column headings! */
LOOP
/* Add in all the data */
FOR k IN 1..10 /* Block has 10 visible columns */
LOOP
IF NOT name_in(:system.cursor_item) IS NULL THEN
args:=ole2.create_arglist;
ole2.add_arg(args, j);
ole2.add_arg(args, k);
cell:=ole2.get_obj_property(worksheet, 'Cells', args);
ole2.destroy_arglist(args);
ole2.set_property(cell, 'Value', name_in(:system.cursor_item));
ole2.release_obj(cell);
END IF;
next_item;
END LOOP;
j:=j+1;
IF :system.last_record = 'TRUE' THEN
exit;
ELSE
next_record;
END IF;
END LOOP;
ole2.Release_Obj(worksheet);
ole2.Release_Obj(worksheets);
/* Save the Excel file created */
args := ole2.Create_Arglist;
ole2.Add_Arg(args, file_name_cl);
ole2.Invoke(workbook, 'SaveAs', args);
ole2.Destroy_Arglist(args);
/* release workbook */
ole2.Release_Obj(workbook);
ole2.Release_Obj(workbooks);
/* Release application */
ole2.Invoke(application, 'Quit');
ole2.Release_Obj(application);
EXCEPTION
WHEN user_cancel THEN
RAISE;
END; -
Export data from MSA to Excel?
Can we export daat from MSA to Excel? When we search for the business partners, is there a way to download the results to excel?
Thanks!Hi,
Yes you can bring the data to Excel. One you a Business Partner Search,the results flow down to the list tile.
1)Select one of the grid rows and Right Click on where the Arrow points.
2) A small drop down comes up.choose the option "Generate Report".
3) This opens up the"InstantReport" screen. Choose "MicrosoftExcel" in the Instant Report To Combo.
4)Select the grid columns that you want and add them using the buttons present there.
5)Then click on the button "Generate".
6)The data flows down to an Excel sheet.
Regards,
Abishek -
Exporting Data from Forms to Excel
Hi,
How can I export the data from Forms to Excel like which Export function in the Oracle Applications.
Thank you,
VoonHello,
By using dde package you can export the data from Form to Excel. Here is the sample code which i have used. you can write this code in the when_button_pressed trigger.
declare
appl_name varchar2(255);
channel_id pls_integer;
application_id pls_integer;
x number;
y number;
V_TIME VARCHAR2(30);
begin
if :global.application_id is not null then
message('Application already open');
else
appl_name := 'c:\program files\microsoft office\office\excel.exe';
:global.application_id := dde.app_begin(appl_name,dde.app_mode_normal);
end if;
if :global.channel_id is not null then
message('Communication channel already established.');
elsif :global.application_id is null then
message('Application must be launched first.');
else
:global.channel_id := dde.initiate('excel','book1');
end if;
DDE.POKE(:global.channel_id,'R1C1','Col1 Heading',DDE.CF_TEXT,1000);
DDE.POKE(:global.channel_id,'R1C2','Col2 Heading',DDE.CF_TEXT,1000);
DDE.POKE(:global.channel_id,'R1C3','Col3 Heading',DDE.CF_TEXT,1000);
FIRST_RECORD;
X := No of Records;
for y in 2..x
loop
launch_excel is a program unit--
launch_excel(y,:global.channel_id,:block.item1,:block.item2,::block.item3);
next_record;
end loop;
FIRST_RECORD;
EXCEPTION
WHEN DDE.DDE_APP_FAILURE THEN
MESSAGE('Could not launch application for DDE operations.');
RAISE FORM_TRIGGER_FAILURE;
WHEN DDE.DDE_INIT_FAILED THEN
MESSAGE('Could not initialize DDE communication channel.');
RAISE FORM_TRIGGER_FAILURE;
WHEN DDE.DMLERR_NO_CONV_ESTABLISHED THEN
MESSAGE('Could not establish DDE communication channel.');
RAISE FORM_TRIGGER_FAILURE;
WHEN OTHERS THEN
MESSAGE('Error: '| |TO_CHAR(SQLCODE)| |' '| |SQLERRM);
RAISE FORM_TRIGGER_FAILURE;
END;
LAUNCH_EXCEL
PROCEDURE LAUNCH_EXCEL(
y in number,
channel_id pls_integer,
param1 varchar2,
param2 VARCHAR2,
param3 varchar2) IS
v_rowno varchar2(20) := 'R'| |y;
BEGIN
dde.poke(channel_id,v_rowno| |'C1',col1,dde.cf_text,2000);
dde.poke(channel_id,v_rowno| |'C2',col2,dde.cf_text,2000);
dde.poke(channel_id,v_rowno| |'C3',col3,dde.cf_text,2000);
EXCEPTION
when others then
message('Error --'| |sqlcode| |sqlerrm);
message('Error --'| |sqlcode| |sqlerrm);
raise form_trigger_failure;
END;
null
Maybe you are looking for
-
Sum of same fields in two different tables
Hi , I am facing a problem, hope anyone would help I have two tables.. here is the sample data.. create table t1 (item_ID NUMBER(2), book_ID NUMBER(2), price NUMBER(2)) insert into t1 (item_ID, book_ID, price) values (1,1,60); insert into t1 (item_ID
-
Safari doesn't display some title text on websites properly...
Hi, I get strange problems on Safari. Safari doesn't display title text on some websites. It is replaced with some mathematical fonts like small numbers, figures and etc... But it happens to only title text. All other body text is fine. I thought fon
-
Unable to fully form trunks between 3850 and 4503-E switches
Hi all, This last weekend I tried to replace a stack of 3750G's with a stack of new 3850's. The stack of switches has 2 fibre uplinks to the core switches (4503-E). It didn't go well, and I had to revert the project. The stack was all pre-configured
-
Howto. stacked canvas as splash screen
hello all users of forms world! problem: how to display a splash screen with a text inside when a process is launched in a canvas full of iteration etc... solution: assume we have a content canvas C playing the role of a data processor, items browser
-
Optical audio output not working on mac mini
I have a brand new mac mini (less than a week old) that I've hooked up to my media center. Unfortunately, when I hook the optical audio output to my Pioneer receiver, I get no sound. I know the receiver decodes optical audio correctly because it does