Open Text output of a Report in Excel  - Bad format

Hi All,
We have a report in Oracle Apps 11i(11.5.10) with Text as output format. We would like to open the file in Excel format.
We have done the recommended setups from the metalink note ID 316752.1.
Output is generated in Excel, but the format is not proper. Column level data is not displayed on Cell wise in the Excel, instead all the output is
dispalyed in single column in the Excel.
Any pointers on how to format the output to align each column in the output to the individual cell in the Excel.
Or else.. how to generate the output to Excel file?
Regards,
Ram

user504044 wrote:
Helios,
Kind regards for the reply.
I have surfed all the notes. My problem is.. I can open the text output in Excel. But the format is bad.
Output is nor properly alinged to the cells in the Excel.
And being the report is .RDF, any way we can do on the format?Hi Ram,
1. Are you using XML publisher to get the excel output?
2. If yes did you set the layout to excel when you run the concurrent request on the SRS screen?
Thanks
Shailendra
>
Regards,
Ram

Similar Messages

  • Text output from 11i Reports to Excel - bad Format

    Hi All,
    We have a report in Oracle Apps 11i(11.5.10) with Text as output format. We would like to open the file in Excel format.
    We have done the recommended setups from the metalink note ID 316752.1.
    Output is generated in Excel, but the format is not proper. Column level data is not displayed on Cell wise in the Excel, instead all the output is
    dispalyed in single column in the Excel.
    Any pointers on how to format the output to align each column in the output to the individual cell in the Excel.
    Or else.. how to generate the output to Excel file?
    Regards,
    Ram

    Consider a 3rd-party tool as a solution.  For a list of such tools, see http://www.kenhamady.com/bookmarks.html.
    There is at least one Report Manager on that list that can automate the process of exporting a Crystal report to PDF and converting the resulting PDF to an image (BMP, JPEG, WMF, EMF, EPS, PNG, GIF, or TIF).  You can call that Report Manager from your application via a command line api.
    - Ido

  • How to download alv grid output(with field catalog) into excel file format

    Hi all,
    How to download alv grid output(with field catalogs) into excel file format and same file has to download to application server.
    Please help.
    Regards,
    Satya.

    Hi,
    On list where alv is displayed, select export icon( green color -> ),select spread sheet.
    This will display records in Excel sheet.

  • Open text files & save as worksheets in excel with Automator?

    hi,
    i'm an Automator newbie and i'll admit upfront i don't know apple script. i have a bunch of text files that i'd like to open in excel. the basic actions would be to tell excel to look for 'all documents' and to open as space delimited. then i want to save the files as excel spreadsheets rather than txt files.
    i assume i need to use some combination of applescript and automator to do this, but i don't even know where to start. it seems this is something simple someone might have already written a script/action for. is there a repository of such things anywhere? if not, does anyone want to help me through the process of creating such an action?
    thanks,
    jill
    PB G4 1.5GHz, dual PM G5   Mac OS X (10.4.7)   airport, bluetooth

    jill,
    Here is a solution.
    Create an Automator workflow with the following actions:
    1) Get Specified Finder Items (specify the folder containing your space delimited text files)
    2) Get Folder Contents
    3) Run AppleScript (delete all of the text in the action, click on the link below which will put the AppleScript into Script Editor, select the whole thing, copy it to the Clipboard, paste it into the action)
    click here to open this script in your editor<pre style="font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px">on run {input, parameters}
    repeat with aTextFile in input
    set theTextFilePath to aTextFile as string
    tell application "Microsoft Excel"
    open text file filename theTextFilePath data type delimited with space
    set theWorkbook to last workbook
    set thePath to path of last workbook
    set theOriginalWorkbookName to name of last workbook
    set theNewWorkbookName to ((characters 1 through -5 of theOriginalWorkbookName) as string) & ".xls"
    set theNewFilePath to thePath & ":" & theNewWorkbookName
    save workbook as theWorkbook filename theNewFilePath file format workbook normal file format
    close theWorkbook saving no
    end tell
    end repeat
    return input
    end run</pre>
    I am assuming that the text files are the only files in the folder. If they are not then some further filtering will be required likely through inserting a Filter Finder Items action after step 2).
    PowerBook 12"   Mac OS X (10.4.7)  

  • Report Scheduling Excel/PDF format Parameters field empty

    Hi all,
    i have a question on report scheduling.
    I'm scheduled a report with prompt and will send out the report as Excel format through SMTP emailing.
    When i look on the History of the report, it shows the instance, but for the field Parameters it appear empty. I tried to reschedule the report with Webi format and check on the Parameters field in the History, and the Parameters field for Webi format is showing the prompt value i set.
    The link below show the picture :
    [http://i642.photobucket.com/albums/uu144/stevesiow/BO.jpg|http://i642.photobucket.com/albums/uu144/stevesiow/BO.jpg]
    i am curious the different of paramenters field showing for different format of file emailing out.
    Thanks for advise.
    Regards,
    Steve

    Steve,
    Seeing this in .Net 3.1 InfoView.  I fired up JAVA InfoView and the parameters all show up.  Another bug in 3.1.

  • Repeating row texts when exporting web report to Excel

    Dear all,
    When exporting a web report (including a structure/hierarchy) to Excel (via the 'export to excel button), the row texts (e.g. balance sheet texts) appear twice (column A and B)in the Excel result.
    When using the web context menu 'Export to Excel' this issue does not occur.
    I am using a BW 3.5 system which has been upgraded to support pack 16.
    I assume it is the combination of the structure and the 'export to excel' functionality that does not match up, because when I switch off the hierarchy functionality in the web report query properties, the export to excel does not give me any problems.
    Does anyone know how to solve this issue?
    Thanks in advance,
    Arjan.

    Did you write that software, COTS package called Medgate?
    If not then ask that company for support. No one here would know how to fix it. They are using the CR RDC report engine.
    Thank you
    Don

  • Unable to Check ADD Attachment Check Box. Thereby getting only email and not the attachment (which will contain the output of BO report , in Excel Format)

    Post Author: hteoh
    CA Forum: Publishing
    I have an BO related issue. I tried to schedule a smtp event in BO to email the report output as Excel. Since this report will go to different users, I unchecked the Use the Job Server's defaults (CHECK BOX). For some reason, I can't check the Add Attachment(CHECK BOX). I received the email but without attachement. Do you know why I can't use attachment. The SMTP event works perfectly if I check Use the Job Server's defaults.

    Hi!
    Use the below code to populate the Sender and receiver mail ids:
    DATA GV_SENDER    TYPE SWC_OBJECT.    
    DATA GV_SENDER_ID LIKE SWOTOBJID.      
    SWC_CONTAINER LT_CONTAINER.
    reset data for CTCV
    CALL FUNCTION 'CTCV_INIT_USER_DATA'.
      Create sender using sender mail address from new table
        SWC_CLEAR_CONTAINER LT_CONTAINER.
        SWC_CREATE_OBJECT GV_SENDER    'RECIPIENT' SPACE.
        SWC_SET_ELEMENT LT_CONTAINER 'AddressString'
                                         ZMAIL-SENDER.
        SWC_SET_ELEMENT LT_CONTAINER 'TypeID' 'B'.
        SWC_CALL_METHOD GV_SENDER    'CreateAddress' LT_CONTAINER.
        IF SY-SUBRC NE 0.
             MESSAGE ID SY-MSGID TYPE 'E' NUMBER SY-MSGNO
                     WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4
                     RAISING SENDER_CREATION_FAILED.
        ENDIF.
        SWC_OBJECT_TO_PERSISTENT GV_SENDER GV_SENDER_ID.
    Similarly you can create the recipient mail id. Pass the GV_SENDER_ID to OPEN_FORM.
    Cheers!

  • Text output from Oracle Reports 6 and Apps

    I am trying to write a couple of reports with Oracle Reports 6i that will be used as a comma delimited text file for import into other applications. I have the reports written and registered with Oracle Apps. However, I am having two problems that I can not figure out. (1) When the report is
    exectuted and saved as a text file, it will not import into other programs such as Access, giving an error that one line contains too many characters. If I open the text file, there is a blank line (actually a new line with no data) at the very end. When I delete this new line so the cursor is
    positioned after the last character of text and save the file - it will import fine. How do I avoid this problem? (2) One report has a lot of columns, and the data always comes out wrapped, even though it isn't
    wrapped in the report writer that I can tell. The "wrapping" option on the text editor is turned off, so it looks like a new line is actually being created. Any ideas would be appreciated!
    null

    pls reply

  • Send the output of the report  in a zip format

    Hi,
    I have a report,
    Currently when we run the report we are sending the file in excel format to the external mail id using the FM SO_DOCUMENT_SEND_API1.
    But now the requirement is to ZIP the data in the format of an excel form and then send it to the Mail.
    If any of you have done with this,
    Please help me with a sample code starting from converting to Zip and then sending the mail.
    Iam having two versions of SAP 4.7 and ECC 6.0.
    Regards,
    Sasidhar

    Hi,
    In my report program i have my data in an internal table.
    lets say ITAB.
    Now we cna send the data from this table easily in amail as an excel attachment using FM SO_DOCUMENT_SEND_API1.
    But in our case,
    we want our ITAB data to be first converted into an excel format and then convert this into a zip file and send as an attachment.
    How cna we cna make use of classes CL_ABAP_ZIP AND CL_DOCUMENT_BCS.
    I have checked all th threads as specified by you.
    But now where its clear on this.
    Can anybody have a sample code for this.
    Please help me.
    Regards,
    sasi

  • Conevert reports into excel

    Hi all,
    I want to convert customize reports in oracle ebs 11i into excel with report format, please
    tell me how can do this.
    Regards
    Rizwan Ali

    Hi;
    Please see:
    Re: Open Text output of a Report in Excel  - Bad format
    Regard
    Helios

  • Excel Output For Standard Report In R12

    Hi Experts,
    My Client wants Excel Output for Standard Reports ( ex:-Open Purchase Order Report (by cost center)_xml)
    I changed the default output to Excel in Template of xml publisher administrator Responsibility.
    Now it is showing the Excel output, but The layout of report is not same as layout which in text output of standard report.
    Please guide me is there any solution to develop the reports layout in ms-excel using xml file rather than rtf template.
    Thanks
    Durga.

    Hi Alex,
    Thanks for your replay.
    Generating the new rtf template which is same as standard layout is difficult task for us. Actually we have 120 reports which have same requirement.
    Is there any other solution for this . please guide me
    Thanks
    Durga
    Edited by: 805567 on Jan 23, 2012 12:33 PM

  • Output of report in excel and sending thatexcel as mail

    Hi all,
    I need to send a mail which contain the output of a report in excel sheet.
    Please tell me how to do this or of having plese give the sample code
    Regards
    Ajay

    hi check this..
    REPORT  ZMAIL.
    TABLES: ekko.
    PARAMETERS: p_email   TYPE somlreci1-receiver.
    TYPES: BEGIN OF t_ekpo,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
    END OF t_ekpo.
    DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,
          wa_ekpo TYPE t_ekpo.
    TYPES: BEGIN OF t_charekpo,
      ebeln(10) TYPE c,
      ebelp(5)  TYPE c,
      aedat(8)  TYPE c,
      matnr(18) TYPE c,
    END OF t_charekpo.
    DATA: wa_charekpo TYPE t_charekpo.
    DATA:   it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:   it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:   t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
            t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
            t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            w_cnt TYPE i,
            w_sent_all(1) TYPE c,
            w_doc_data LIKE sodocchgi1,
            gd_error    TYPE sy-subrc,
            gd_reciever TYPE sy-subrc.
    *START_OF_SELECTION
    START-OF-SELECTION.
      Retrieve sample data from table ekpo
      PERFORM data_retrieval.
      Populate table with detaisl to be entered into .xls file
      PERFORM build_xls_data_table.
    *END-OF-SELECTION
    END-OF-SELECTION.
    Populate message body text
      perform populate_email_message_body.
    Send file by email as .xls speadsheet
      PERFORM send_file_as_email_attachment
                                   tables it_message
                                          it_attach
                                    using p_email
                                          'Example .xls documnet attachment'
                                          'XLS'
                                          'filename'
                                 changing gd_error
                                          gd_reciever.
      Instructs mail send program for SAPCONNECT to send email(rsconn01)
      PERFORM initiate_mail_execute_program.
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT ebeln ebelp aedat matnr
       UP TO 10 ROWS
        FROM ekpo
        INTO TABLE it_ekpo.
    ENDFORM.                    " DATA_RETRIEVAL
    *&      Form  BUILD_XLS_DATA_TABLE
          Build data table for .xls document
    FORM build_xls_data_table.
      data: ld_store(50) type c.  "Leading zeros
      CONSTANTS: con_cret(5) TYPE c VALUE '0D',  "OK for non Unicode
                 con_tab(5) TYPE c VALUE '09'.   "OK for non Unicode
    *If you have Unicode check active in program attributes thnen you will
    *need to declare constants as follows
    *class cl_abap_char_utilities definition load.
    *constants:
       con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
       con_cret type c value cl_abap_char_utilities=>CR_LF.
      CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR' INTO it_attach SEPARATED BY con_tab.
      CONCATENATE con_cret it_attach  INTO it_attach.
      APPEND  it_attach.
      LOOP AT it_ekpo INTO wa_charekpo.
    *Modification to retain leading zeros
      inserts code for excell REPLACE command into ld_store
      =REPLACE("00100",1,5,"00100")
        concatenate '=REPLACE("' wa_charekpo-ebelp '",1,5,"'
                                 wa_charekpo-ebelp '")' into ld_store .
      concatenate ld_store into .xls file instead of actual value(ebelp)
        CONCATENATE wa_charekpo-ebeln ld_store  wa_charekpo-aedat wa_charekpo-matnr  INTO it_attach SEPARATED BY con_tab.
        CONCATENATE con_cret it_attach  INTO it_attach.
        APPEND  it_attach.
      ENDLOOP.
    ENDFORM.                    " BUILD_XLS_DATA_TABLE
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
          Send email
    FORM send_file_as_email_attachment tables pit_message
                                              pit_attach
                                        using p_email
                                              p_mtitle
                                              p_format
                                              p_filename
                                              p_attdescription
                                              p_sender_address
                                              p_sender_addres_type
                                     changing p_error
                                              p_reciever.
      DATA: ld_error    TYPE sy-subrc,
            ld_reciever TYPE sy-subrc,
            ld_mtitle LIKE sodocchgi1-obj_descr,
            ld_email LIKE  somlreci1-receiver,
            ld_format TYPE  so_obj_tp ,
            ld_attdescription TYPE  so_obj_nam ,
            ld_attfilename TYPE  so_obj_des ,
            ld_sender_address LIKE  soextreci1-receiver,
            ld_sender_address_type LIKE  soextreci1-adr_typ,
            ld_receiver LIKE  sy-subrc.
      ld_email   = p_email.
      ld_mtitle = p_mtitle.
      ld_format              = p_format.
      ld_attdescription      = p_attdescription.
      ld_attfilename         = p_filename.
      ld_sender_address      = p_sender_address.
      ld_sender_address_type = p_sender_addres_type.
    Fill the document data.
      w_doc_data-doc_size = 1.
    Populate the subject/generic message attributes
      w_doc_data-obj_langu = sy-langu.
      w_doc_data-obj_name  = 'SAPRPT'.
      w_doc_data-obj_descr = ld_mtitle .
      w_doc_data-sensitivty = 'F'.
    Fill the document data and get size of attachment
      CLEAR w_doc_data.
      READ TABLE it_attach INDEX w_cnt.
      w_doc_data-doc_size =
         ( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
      w_doc_data-obj_langu  = sy-langu.
      w_doc_data-obj_name   = 'SAPRPT'.
      w_doc_data-obj_descr  = ld_mtitle.
      w_doc_data-sensitivty = 'F'.
      CLEAR t_attachment.
      REFRESH t_attachment.
      t_attachment[] = pit_attach[].
    Describe the body of the message
      CLEAR t_packing_list.
      REFRESH t_packing_list.
      t_packing_list-transf_bin = space.
      t_packing_list-head_start = 1.
      t_packing_list-head_num = 0.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE it_message LINES t_packing_list-body_num.
      t_packing_list-doc_type = 'RAW'.
      APPEND t_packing_list.
    Create attachment notification
      t_packing_list-transf_bin = 'X'.
      t_packing_list-head_start = 1.
      t_packing_list-head_num   = 1.
      t_packing_list-body_start = 1.
      DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
      t_packing_list-doc_type   =  ld_format.
      t_packing_list-obj_descr  =  ld_attdescription.
      t_packing_list-obj_name   =  ld_attfilename.
      t_packing_list-doc_size   =  t_packing_list-body_num * 255.
      APPEND t_packing_list.
    Add the recipients email address
      CLEAR t_receivers.
      REFRESH t_receivers.
      t_receivers-receiver = ld_email.
      t_receivers-rec_type = 'U'.
      t_receivers-com_type = 'INT'.
      t_receivers-notif_del = 'X'.
      t_receivers-notif_ndel = 'X'.
      APPEND t_receivers.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                document_data              = w_doc_data
                put_in_outbox              = 'X'
                sender_address             = ld_sender_address
                sender_address_type        = ld_sender_address_type
                commit_work                = 'X'
           IMPORTING
                sent_to_all                = w_sent_all
           TABLES
                packing_list               = t_packing_list
                contents_bin               = t_attachment
                contents_txt               = it_message
                receivers                  = t_receivers
           EXCEPTIONS
                too_many_receivers         = 1
                document_not_sent          = 2
                document_type_not_exist    = 3
                operation_no_authorization = 4
                parameter_error            = 5
                x_error                    = 6
                enqueue_error              = 7
                OTHERS                     = 8.
    Populate zerror return code
      ld_error = sy-subrc.
    Populate zreceiver return code
      LOOP AT t_receivers.
        ld_receiver = t_receivers-retrn_code.
      ENDLOOP.
    ENDFORM.
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
          Instructs mail send program for SAPCONNECT to send email.
    FORM initiate_mail_execute_program.
      WAIT UP TO 2 SECONDS.
      SUBMIT rsconn01 WITH mode = 'INT'
                    WITH output = 'X'
                    AND RETURN.
    ENDFORM.                    " INITIATE_MAIL_EXECUTE_PROGRAM
    *&      Form  POPULATE_EMAIL_MESSAGE_BODY
           Populate message body text
    form populate_email_message_body.
      REFRESH it_message.
      it_message = 'Please find attached a list test ekpo records'.
      APPEND it_message.
    endform.                    " POPULATE_EMAIL_MESSAGE_BODY

  • How would I output 9i report to excel ?

    I am using reports 9i and want to send the output of my report to excel. I remember that in 6i, I just selected file -> output to xls, or something like that. I can't find how to do that now.
    Thanks.

    1) You can output the report in delimited format (In builder , Generate file to --> delimited)
    Delimited format output can be opened in Excel.
    Refer the following link
    http://download-west.oracle.com/docs/html/B10602_01/orbr_concepts2.htm#1014636
    2) Alternately this is another approach while publishing report to web
    http://otn.oracle.com/products/reports/htdocs/getstart/demonstrations/excel/index.html
    3)>> I remember that in 6i, I just selected file -> output to xls, or something like that<<
    You might be referring to "Generate to delimited".
    Thanks
    Ratheesh

  • Problem when down loading a simple report to Excel sheet

    HI Frenz,
    When I download a Simple report to excel , The Excel shows a blank column in between two column, which should not be the case.
    Kindly let me know ASAP
    Regards
    Irfan

    Hi,
    Check out the below samle code
    Download a report to excel with format (border, color cell, etc) 
    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
    Cheers,
    Chandru

  • Down loading an ALV report in EXCEl

    my ALV report contains 76 columns, if i try to download it in an excel sheel its not getting displayed in correct format.
    Few columns are automatically displayed in the second row and also all my values are getting collapsed due to this display.
    In the print preview also i am getting the same problem.
    Is there any column limit in ALV display or i can make it to get display correctly as it is in the exact output.

    Hi,
    here is an example of downloading an alv report in excel...
    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

Maybe you are looking for

  • Extended features no longer available

    I have created two forms in LiveCycle Designer ES4. I want people to complete them using Acrobat Reader XI so I opened each one in Acrobat Professional XI and saved them with extended features enabled. I then tested them in Acrobat Reader XI before d

  • Running Widows Vista system, every time I try to copy and paste from Firefox DEP shuts down Word Works

    I am using a HP desk top with Windows Vista. When ever I try to copy and paste from Mozilla Firefox, the DEP system shuts down Microsoft Works Word Processor. I have tried turning off DEP for Works but it still shuts down the Program.

  • CATS Field selection screen

    Hi, In CATS field selection screen -> Screen groups -> under work list and Data entry selection, I have chosen the fields Network, Activity Type, Activity, Sender Cost center, Plant, Total and Short text to be displayed / input. Out of these in CAT2,

  • Importing photos in order

    I have a disc of photos to import that I want to keep in order. The photos come from several sources with assorted titles. How do I keep the burn order of the disc in an event folder?

  • Desktop Software 6.0 - Cannot Change Photo or Video Location - Crash

    I have been trying to change the locations used to sync photo and videos to another drive than the one that is pointed to by my windows profile.  The "My Documents" directory is relocated to a network drive by our network policies.  However there is