Convert report output into excel file
hiii,
Can we convert output of report into excel file format?
Plz tell me the.
Thanks in advance
Hello,
http://download-uk.oracle.com/docs/cd/B14099_17/bi.1012/b13895/orbr_paptoexcel.htm
29 Building a Report for Spreadsheet Output
Regards
Similar Messages
-
How to export report output into excel file
hi friends,
i would like to get the solution from you for how to export the report output into a .xls file. i know how to convert it into .rtf and .txt files but i think it's difficult to do this .xls way, could you help me to comeover this problem?
thankyou very much.The official answer is "delimited", which
generates adequate comma or other delimited
text. No formatting, and without extra
effort no support for non-ASCII characters.
Might be sufficient for you.
Note that Excel can read html files - we
built programs to generate html files with
name of "blah.xls" and some Excel-ish
extensions, so Excel is automatically opened
and the document is all nice and pretty.
(Oracle html output has some odd logic about
choosing number of columns, we didn't use
it.)
-- Allan Plum -
How to convert alv list into excel file?
Hi Experts,
i have created one report for Due Date Analysis.
Now My output is displaying in ALV list. But I need to convert the data which in alv list into Excel File. then only i have to send the Excel File to the Customer Thro Email.
So i need the Function Module to Convert the Data into Excel File.
Thanks,
Neptune.MHi,
U can use function module gui_download.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
filename = 'C:\Transportaionlane.XLS'
filetype = 'DAT'
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TABLES
ata_tab = t_trans_lane_dis[]
OTHERS = 22
if u want with header then pass the header.
regards
Ahasan -
How to export report output into excel.
Hi all
how to export report output into excel sheet can any on give me answer step by step please as soon as possible
kkHi Prashanth,
If you are executing Query from WAD ---> Right click on Table (only on Characteristics Data) --> Enhanced Menu ---> Export as --> CSV file or MS Excel
assign points if this helps,
Thanks,
Sudhakar -
How to download report output to excel file??
Hi all,
I have a problem with downloading a report output to an excel file? May i know is there any functions or methods to do it?
My situation is like this. I used Write function to print out the report. After user click on the execute button. The report output will show to the user in a table format. And there is one button 'Save To Excel' in the report output dipslay screen for user to click to save it into excel format.
Appreciate if you could help.
Thanks.
Regards,
RachelHi Rachel,
You can use FM GUI_DOWNLOAD for transferring the data from your report program into excel sheet.
And while saving give the filename extension as .xls.
Reward if helpful.
With regards,
Syed -
Download the ALV Report output into excel sheet or notepad
Hi,
how to downlaod the alv report out into excel sheet or notepad in a proper manner. program contain large number records....
Thanks in advance!!!!
Regards,
kranthi.Hi
Download a report to excel with format (border, color cell, etc)
Try this program...it may help you to change the font ..etc.
Code:
REPORT ZSIRI NO STANDARD PAGE HEADING.
this report demonstrates how to send some ABAP data to an
EXCEL sheet using OLE automation.
INCLUDE OLE2INCL.
handles for OLE objects
DATA: H_EXCEL TYPE OLE2_OBJECT, " Excel object
H_MAPL TYPE OLE2_OBJECT, " list of workbooks
H_MAP TYPE OLE2_OBJECT, " workbook
H_ZL TYPE OLE2_OBJECT, " cell
H_F TYPE OLE2_OBJECT. " font
TABLES: SPFLI.
DATA H TYPE I.
table of flights
DATA: IT_SPFLI LIKE SPFLI OCCURS 10 WITH HEADER LINE.
*& Event START-OF-SELECTION
START-OF-SELECTION.
read flights
SELECT * FROM SPFLI INTO TABLE IT_SPFLI UP TO 10 ROWS.
display header
ULINE (61).
WRITE: / SY-VLINE NO-GAP,
(3) 'Flg'(001) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
(4) 'Nr'(002) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
(20) 'Von'(003) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
(20) 'Nach'(004) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
(8) 'Zeit'(005) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP.
ULINE /(61).
display flights
LOOP AT IT_SPFLI.
WRITE: / SY-VLINE NO-GAP,
IT_SPFLI-CARRID COLOR COL_KEY NO-GAP, SY-VLINE NO-GAP,
IT_SPFLI-CONNID COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
IT_SPFLI-CITYFROM COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
IT_SPFLI-CITYTO COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
IT_SPFLI-DEPTIME COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP.
ENDLOOP.
ULINE /(61).
tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = 0
TEXT = TEXT-007
EXCEPTIONS
OTHERS = 1.
start Excel
CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
PERFORM ERR_HDL.
SET PROPERTY OF H_EXCEL 'Visible' = 1.
CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'c:\kis_excel.xls'
PERFORM ERR_HDL.
tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = 0
TEXT = TEXT-008
EXCEPTIONS
OTHERS = 1.
get list of workbooks, initially empty
CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
PERFORM ERR_HDL.
add a new workbook
CALL METHOD OF H_MAPL 'Add' = H_MAP.
PERFORM ERR_HDL.
tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = 0
TEXT = TEXT-009
EXCEPTIONS
OTHERS = 1.
output column headings to active Excel sheet
PERFORM FILL_CELL USING 1 1 1 'Flug'(001).
PERFORM FILL_CELL USING 1 2 0 'Nr'(002).
PERFORM FILL_CELL USING 1 3 1 'Von'(003).
PERFORM FILL_CELL USING 1 4 1 'Nach'(004).
PERFORM FILL_CELL USING 1 5 1 'Zeit'(005).
LOOP AT IT_SPFLI.
copy flights to active EXCEL sheet
H = SY-TABIX + 1.
PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
ENDLOOP.
changes by Kishore - start
CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
CALL METHOD OF H_EXCEL 'Worksheets' = H_MAPL." EXPORTING #1 = 2.
PERFORM ERR_HDL.
add a new workbook
CALL METHOD OF H_MAPL 'Add' = H_MAP EXPORTING #1 = 2.
PERFORM ERR_HDL.
tell user what is going on
SET PROPERTY OF H_MAP 'NAME' = 'COPY'.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = 0
TEXT = TEXT-009
EXCEPTIONS
OTHERS = 1.
output column headings to active Excel sheet
PERFORM FILL_CELL USING 1 1 1 'Flug'(001).
PERFORM FILL_CELL USING 1 2 0 'Nr'(002).
PERFORM FILL_CELL USING 1 3 1 'Von'(003).
PERFORM FILL_CELL USING 1 4 1 'Nach'(004).
PERFORM FILL_CELL USING 1 5 1 'Zeit'(005).
LOOP AT IT_SPFLI.
copy flights to active EXCEL sheet
H = SY-TABIX + 1.
PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
ENDLOOP.
changes by Kishore - end
disconnect from Excel
CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'C:\SKV.XLS'.
FREE OBJECT H_EXCEL.
PERFORM ERR_HDL.
FORM FILL_CELL *
sets cell at coordinates i,j to value val boldtype bold *
FORM FILL_CELL USING I J BOLD VAL.
CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
PERFORM ERR_HDL.
SET PROPERTY OF H_ZL 'Value' = VAL .
PERFORM ERR_HDL.
GET PROPERTY OF H_ZL 'Font' = H_F.
PERFORM ERR_HDL.
SET PROPERTY OF H_F 'Bold' = BOLD .
PERFORM ERR_HDL.
ENDFORM.
*& Form ERR_HDL
outputs OLE error if any *
--> p1 text
<-- p2 text
FORM ERR_HDL.
IF SY-SUBRC <> 0.
WRITE: / 'Fehler bei OLE-Automation:'(010), SY-SUBRC.
STOP.
ENDIF.
ENDFORM. " ERR_HDL
Please note that this example maybe slow at filling the excel table
(perhaps four fields per second on a 900 MHz machine - almost 30 seconds
for a short example).
To get the data on properties and methods - there is a bit of smoke and mirrors
going on here; they are EXCEL properties and methods, not sap ones - so you need
to look at excel help to determine how a particular function is structured. then
build the block in sap, as shown in the example.
If you only want to transfer the data to Excel like when you transfer the data from
ALV to Excel simply use the Function Modules:
XXL_SIMPLE_API
If you want more modifications when you transfer it to Excel use:
XXL_FULL_API -
Hi,
I am running a report as
desformat=spreadsheet destype=file desname=c:\ssss.xls
now after getting the message "SUCCESSFULLY RUN" this file is generating in server's c: drive, is there anyway to save it on the local PC from where the report is being run? or to open the .xls file just after running the report?
Thanks
I have got the solution.
Thanks
Edited by: Suman... on Mar 6, 2012 3:01 AMRun report with destype=cache and mimetype=application/vnd.ms-excel. Now your report output will open in MS Excel. Then you can save the output.
-
ALV report output to excel file, zip it and send to email
my requirement is to run a report then the result will be sent to email. Attachment is an excel file that is zipped since file size is about 25MB
I've search several forums and found a sap template in sending email with excel file attachment, it is BCS_EXAMPLE_7
but it should be zipped, what i found is this CL_ABAP_ZIP, but with my understanding, the file needs to be in PDF format to be able to zip
has anyone had the same requirement before?
Would be thankful to your input guys, thanks!any ideas guys?
-
Save ALV report output as excel file in background
Hi all,
As the no. of records is huge and the running time is long, I'd like to modify my program to be able to run in background mode with excel as output..
Is there any method to generate the result list in ALV format and save it as an excel file while running the program in background mode?
And any limitation?
Thanks!Try to create ALV output to spool in background then try to use any of the below mentioned fm
SAP_CONVERT_TO_XLS_FORMAT
MS_EXCEL_OLE_STANDARD_DAT
RSPO_DOWNLOAD_SPOOLJOB
RH_START_EXCEL_WITH_DATA
or
create CSV using OPEN DATASET & TRANSFER
a® -
Converting Report into excel file
Hello everybody
i want to convert report output into excel format(in csv format) without using
delimeted feature of Reports 6i. how can i do it.I have done it in Forms 6i using
text_io package, but i'm unable to find exact query after running report.
Thx in advance
v k ravi (Noida,India)can you send me a copy of your rdf?
tks....
Hi Ravi
its so simple. send a test mail to [email protected]
i will send u the rdf.
Thank you
Sasi -
Output report data to excel file format or csv format
Is there any way to save softcopy of report output to excel file format or csv format.
Hi,
Regarding csv file format, i have no issues. The file is generating without any issues in using oracle reports without using any PL/SQL code.
My requirement is to design oracle reports to generate excel (.xls) file with multiple worksheets. Each sheets are having many data and graphs(chart).
Using oracle reports alone, how to achieve this.
In oracle reports 10g 1.2.0 version, I tried by creating .rdf file but, it is generating single worksheet only.
In oracle reports 10g 1.2.0 ver, I tried by creating .jsp file. For this first i am creating excel template about how my ouput column headings all that going to be with one sample hard coded data and save the excel file as web page.
Eg employee.html.
Next open the html file in oracle reports builder and double click the websource now, you will see the jsp tags, html and xml tags. Now include the contentType="application/vnd.ms-excel " and charset also.
Next, include the <rw:foreach id="G_EMPNO_1" src="G_EMPNO">
here insert the fieldl for each column by removing the hard coded values.
close the tag
</rw:foreach>
Save the file as .jsp and deploy it in oc4 enabled folder (say, devsuite_home/reports/j2ee/reports_ids/web
Start the oc4J server
Run it in the browser http://server:port/reports/emp.jsp?useride=uid/pwd@db
It is invoking the Microsoft excel with 3 sheets default and my emp table output in the first page.
We can save this output file as .xls file by clicking file -> save as.
1) The question is, it is working fine with Microsoft excel 97-2003 version. But for excel 2007, i am not able to create single html file like how 2003 save web page option.
2) I found this in oracle getting started demo
http://www.oracle.com/technology/products/reports/htdocs/getstart/demonstrations/index.html
Which is more useful. This is what i am looking for.
I done that in excel 2003 as per demo. But excel 2007 with reports 10g issues.
Is there any demo for 10g with excel 2007
3) For most of excel issues working fine with excel 2003 and 10g. But excel 2007 with 10g reports are issues.
I want the excel output from oracle reports with multiple worksheet similar to the above demo.
Thank you. -
How to break report output into files
Hi,
I need to submit my report output into different files based on the Sales person name.
When I submit my request from SRS window it asks the sales person name 'FROM' and 'To'parameters, if I choose the different sales person names then report output has to divide into files for each sales person. How can I do this? Do I nedd to add any code
in my report.
Could you help me in this?
Thanks in advanceThis maybe helpful:
Report Distribution -
Download alv report output to excel format with out header line
Hi experts,
i want to download a alv report output into excel formatt with out the header line but it has to download including field description. as this output will fed into another transaction, the downloaded excel file should be with out header line.
fro eg:
Report : Zabc ABAP Development Page : 1
Run Date : 12/14/06 System: UD400
Run Time : 08:45:37
this header details should not be downloaded into the excel file.
could somebody help me please.
thanks
deepuhi jayanti,
thanks for your response.
i have delclared all the field types as character but still it is not downloading and it 's sy-subrc is 4... the code is as below.
*field names
lt_fieldnames-value = 'Material Number'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Plant'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Material Group'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Material Description'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'UOM'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Price Unit'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Material Type'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'X-Plant Status'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Valuation Class'.
APPEND lt_fieldnames.
lt_fieldnames-value = lw_avmng.
APPEND lt_fieldnames.
lt_fieldnames-value = lw_avntp.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Latest PO Qty'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Latest PO Cost'.
APPEND lt_fieldnames.
lt_fieldnames-value = 'PO Creation Date'.
APPEND lt_fieldnames.
lt_fieldnames-value = lw_fcaqt.
APPEND lt_fieldnames.
lt_fieldnames-value = 'Prev. Yr. Std. Cost'.
APPEND lt_fieldnames.
lt_fieldnames-value = lw_stcst.
APPEND lt_fieldnames.
CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
EXPORTING
file_name = 'XLSHEET'
CREATE_PIVOT = 0
DATA_SHEET_NAME = ' '
PIVOT_SHEET_NAME = ' '
PASSWORD = ' '
PASSWORD_OPTION = 0
TABLES
PIVOT_FIELD_TAB =
data_tab = t_output1
fieldnames = lt_fieldnames
EXCEPTIONS
file_not_exist = 1
filename_expected = 2
communication_error = 3
ole_object_method_error = 4
ole_object_property_error = 5
invalid_pivot_fields = 6
download_problem = 7
OTHERS = 8
IF sy-subrc <> 0.
MESSAGE e001 WITH 'Data could not be downloaded'.
ENDIF.
ENDFORM. " z_dwn_xl
thanks
deepu -
Reports 6i into Excel 97 vs 98, 2000 etc
Hi,
Can anyone give the official line on which version of Excel is supported against Reports 6i.
If I create a HTML report and import into Excel 97 the result is exceptionally poor. Nothing is aligned and it is all unusuable. However in Excel 2000 the HTML gets converted in a pretty decent fashion and my data seems to be well aligned despite a few easy to fix blank columns.
Our client only has Excel 97 and I need an answer urgently on the compatibility between the two products. Does the client need to upgrade or is there a better way to get the report data into Excel?
Regards,
JohnDear John,
Can u tell me how to import HTML report output into Excel ?
With brief steps.
U can reply me on [email protected] / [email protected]
Regards
Sudhir -
How to Download colours of ALV outout into Excel file ?
Hi All,
I have a requirement, Download ALV output into Excel file
but the ALV output contains colors,
I need to download as it is ALV output into Excel,
Please guide me, how to do ?
If it is not possible, Pls provide any other solution for this ?
Appreciate your valuable answers,
Thanks.
Regards,
Prasad.Hi,
Instead of ALV, ucan directly write the output to EXCEL along with the required attributes. Find the below sample code. This might solve ur problem.
Venkat.
*& Report Y_ALV_OLE
REPORT YALV_OLE.
this report demonstrates how to send some ABAP data to an
EXCEL sheet using OLE automation.
include ole2incl.
handles for OLE objects
data: h_excel type ole2_object, " Excel object
h_mapl type ole2_object, " list of workbooks
h_map type ole2_object, " workbook
h_zl type ole2_object, " cell
h_f type ole2_object, " font
h_c type ole2_object. " color
DATA: FILENAME LIKE RLGRAP-FILENAME.
tables: spfli.
data h type i.
table of flights
data: it_t100 like T100 occurs 10 with header line.
*& Event START-OF-SELECTION
start-of-selection.
read flights
select *
from t100
up to 100 rows
into table it_t100
where SPRSL = sy-langu .
tell user what is going on
call function 'SAPGUI_PROGRESS_INDICATOR'
exporting
PERCENTAGE = 0
text = text-007
exceptions
others = 1.
start Excel
create object h_excel 'EXCEL.APPLICATION'.
PERFORM ERR_HDL.
set property of h_excel 'Visible' = 1.
CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 =
*'c:\kis_excel.xls' .
PERFORM ERR_HDL.
tell user what is going on
call function 'SAPGUI_PROGRESS_INDICATOR'
exporting
PERCENTAGE = 0
text = text-008
exceptions
others = 1.
get list of workbooks, initially empty
call method of h_excel 'Workbooks' = h_mapl.
perform err_hdl.
add a new workbook
call method of h_mapl 'Add' = h_map.
perform err_hdl.
tell user what is going on
call function 'SAPGUI_PROGRESS_INDICATOR'
exporting
PERCENTAGE = 0
text = text-009
exceptions
others = 1.
output column headings to active Excel sheet
perform fill_cell using 1 1 1 200 'Language Key'.
perform fill_cell using 1 2 1 200 'Application Area'.
perform fill_cell using 1 3 1 200 'Message number'.
perform fill_cell using 1 4 1 200 'Message text'.
perform fill_cell using 1 5 1 200 'Dep. Time'.
loop at it_t100.
copy flights to active EXCEL sheet
h = sy-tabix + 1.
perform fill_cell using h 1 0 000145000 it_t100-SPRSL.
perform fill_cell using h 2 0 246156138 it_t100-ARBGB.
perform fill_cell using h 3 0 111230222 it_t100-MSGNR.
perform fill_cell using h 4 0 130230230 it_t100-text.
perform fill_cell using h 5 0 115115105 it_spfli-deptime.
endloop.
EXCEL FILENAME
CONCATENATE SY-REPID '_' SY-DATUM6(2) '_' SY-DATUM4(2) '_'
SY-DATUM(4) '_' SY-UZEIT '.XLS' INTO FILENAME.
CALL METHOD OF H_MAP 'SAVEAS' EXPORTING #1 = FILENAME.
free object h_excel.
perform err_hdl.
FORM FILL_CELL *
sets cell at coordinates i,j to value val boldtype bold *
form fill_cell using i j bold col val.
call method of h_excel 'Cells' = h_zl
exporting
#1 = i
#2 = j.
perform err_hdl.
set property of h_zl 'Value' = val .
perform err_hdl.
get property of h_zl 'Font' = h_f.
perform err_hdl.
set property of h_f 'Bold' = bold .
perform err_hdl.
set property of h_f 'Color' = col.
perform err_hdl.
endform. "FILL_CELL
*& Form ERR_HDL
outputs OLE error if any *
--> p1 text
<-- p2 text
form err_hdl.
if sy-subrc <> 0.
write: / 'OLE-Automation Error:'(010), sy-subrc.
stop.
endif.
endform. " ERR_HDL
Maybe you are looking for
-
I can't install a program from dvd, finder tells me the dvd is empty...
Hi all, i recently restorted my laptop to original fabric configuration. now if have reinstall all my software thats bin removed. some dvd's work but some don't. i insert the dvd and de disk drive starts working for a while but then it sort of shuts
-
MacBook Pro shows 356gb of App Storage
My MacBook Pro shows 356gb used for apps but when I click Get Info for the Applications folder it only shows 9gb used. 9gb to 356gb is a significant jump.. Is there any way I could delete this or find the 300gb+ excess of storage is?
-
How to rotate photos that they are already in the phone? By the way they were in the right position in my iPhoto folder but when I transfered them to iPhone they flipped and I was not able to flip them back to their original position.... Is there a t
-
Index for loads from ODS To Cube
The load from ODS to cube is taking a long time - In the start routine another ODS is being looked up - The keys for look up is say X and Y There is already an index existing on keys X , Y & Z - Will this index be used while doing the select on that
-
I found two unknown calendars on my 4g iPhone. How did they get there and how do I remove them