Formatting problem when downloading classical report output to excel sheet.

Dear Experts,
My classical report o/p looks like:
SI    Name   ID
1      xyz     11
2      abc     22
3      eet      33
4      jnc      44
When I download the same to a excel sheet from List->Save->file->Spreadsheet and save it.
The formatting looks like this:
SI   Name   ID
1     xyz               11
2     abc               22
3     eet                33
4     inc                44
That is the heading and column entries are in different columns.
There is no GUI_Download used.
Kindly help what may be the issue.

Hi,
In the report output the formatting looks fine. It is exactly below the heading. But only when I save it to excel, this alignment issue is coming. Even the columns after this column are are properly aligned and there is no issue at all. Only this column in the middle has issue.

Similar Messages

  • Download a classical Report output to excel

    Hi All,
    We have a requirement to download the output of a classical report into a Excel sheet and it should be in the same format as the report output.We don't  just want to dump the internal table data into excel but need to display the classical report outputas it is in the excel sheet.
    Regards,
    Ashish

    Hi there,
    I am not sure on your requirement, but if you want to write a program that manipulates Excel, you can choose to use OLE objects. Below is some sample code.
    REPORT  ZTEST_EXCEL.
    INCLUDE ole2incl.
    DATA: application TYPE ole2_object,
    workbook TYPE ole2_object,
    sheet TYPE ole2_object,
    cells TYPE ole2_object.
    CONSTANTS: row_max TYPE i VALUE 256.
    DATA index TYPE i.
    DATA: BEGIN OF itab1 OCCURS 0, first_name(10), END OF itab1.
    DATA: BEGIN OF itab2 OCCURS 0, last_name(10), END OF itab2.
    DATA: BEGIN OF itab3 OCCURS 0, formula(50), END OF itab3.
    *START-OF-SELECTION
    START-OF-SELECTION.
    APPEND: 'Peter' TO itab1, 'Ivanov' TO itab2,
    '=Sheet1!A1 & " " & Sheet2!A1' TO itab3,
    'John' TO itab1, 'Smith' TO itab2,
    '=Sheet1!A2 & " " & Sheet2!A2' TO itab3.
    CREATE OBJECT application 'excel.application'.
    SET PROPERTY OF application 'visible' = 1.
    CALL METHOD OF application 'Workbooks' = workbook.
    CALL METHOD OF workbook 'Add'.
    * Create first Excel Sheet
    CALL METHOD OF application 'Worksheets' = sheet
    EXPORTING #1 = 1.
    CALL METHOD OF sheet 'Activate'.
    SET PROPERTY OF sheet 'Name' = 'Sheet1'.
    LOOP AT itab1.
    index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
    CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
    SET PROPERTY OF cells 'Value' = itab1-first_name.
    ENDLOOP.
    * Create second Excel sheet
    CALL METHOD OF application 'Worksheets' = sheet
    EXPORTING #1 = 2.
    SET PROPERTY OF sheet 'Name' = 'Sheet2'.
    CALL METHOD OF sheet 'Activate'.
    LOOP AT itab2.
    index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
    CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
    SET PROPERTY OF cells 'Value' = itab2-last_name.
    ENDLOOP.
    * Create third Excel sheet
    CALL METHOD OF application 'Worksheets' = sheet
    EXPORTING #1 = 3.
    SET PROPERTY OF sheet 'Name' = 'Sheet3'.
    CALL METHOD OF sheet 'Activate'.
    LOOP AT itab3.
    index = row_max * ( sy-tabix - 1 ) + 1. " 1 - column name
    CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
    SET PROPERTY OF cells 'Formula' = itab3-formula.
    SET PROPERTY OF cells 'Value' = itab3-formula.
    ENDLOOP.
    * Save excel speadsheet to particular filename
    CALL METHOD OF sheet 'SaveAs'
    EXPORTING #1 = 'c:\temp\exceldoc1.xls' "filename
    #2 = 1. "fileFormat
    * Closes excel window, data is lost if not saved
    * SET PROPERTY OF application 'visible' = 0.
    Edited by: Thung Yuen Yap on Aug 10, 2010 1:52 PM

  • Problem when dowloading the ALV report output to Excel Sheet.

    Hi ,
    I am dowloading the ALV report output to Excel Sheet.
    There is field Condition Unit(KOMP-KMEIN) in the output of the ALV, this has values PC and CSE , but when I download to Excel Sheet, CSE is appearing as CSE ,but PC is appearing as ******.
    Can you please help me in knowing the reson for this.
    Regards,
    Madhu.

    hi
    refer to following link
    http://www.****************/Tutorials/ALV/ColorSALV/Demo.htm
    http://www.sap-img.com/abap/download-to-excel-with-format-border-color-cell-etc.htm
    Cheers
    Snehi
    Edited by: snehi chouhan on Jul 11, 2008 12:42 PM

  • Facing problem while downloading ALV grid Output into Excel

    Hi Guys,
    I am facing problem while downloading ALV grid Output into Excel.
    It is downloading into excel, but all character columns first and next all quantity columns it is displaying. But I need columns order as it is in the grid.
    If I take all columns as characters it works fine. But it will be problem for calculating total, subtotals of quantity columns
    Can someone help me regarding this
    thanks for your help

    Hi,
    Open up Excel on your desktop. Goto Tools > Macro > Security.
    Make sure that your security is set to Medium (or less). SAP uses OLE automation to run the Excel instance and in Office 2003 (for example), Microsoft has increased their default security setting to High. With the High setting, the output to Excel fails.
    Was this your problem? Don't forget those points, either.
    check with this wetther it is solved or not.
    Regards,
    sana.

  • Report output in excel sheet

    hi friends,
    how can i display output of a report in excell sheet.
    regards,
    malleswari.

    Hi
    You would be able to download the report to an Excel Sheet.
    If you are using standard ABAP List then all you have to do is List->Save->File->Choose Spreadsheet as option
    If for ALV
    Please check this link
    https://forums.sdn.sap.com/click.jspa?searchID=255077&messageID=2410067

  • 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
    deepu

    hi 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

  • 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

  • Std Oracle Report output to Excel Sheet

    I'm supposed to make changes to Standard Oracle Report such that the changes of Oracle Standard Report should be Excel output. One of the ways of doing this is to develop the whole report again in Discoverer as it has the feature of outputing into Excel Sheet. I would appreciate if someone can suggest me other ways of achieving it.
    Thanks
    Bobby

    Hi,
    even i am trying to do the same with my reports. Though it is possible to convert the reports to excel using the DESFORMAT attribute on the reports service, I am not able to preserver all the format in the excel sheet.
    I do not want to use rep2excel but want to implement the same idea on my reports service. Is it possible
    thanks

  • SAP WEBGUI - How to download the report output to Excel ?

    Hi Folks ,
    We have generated a report in standard SAP GUI 7.1 . But our requirement is to view the report in SAP WEBGUI and download as EXCEL .
    We can view the report output in SAP WEBGUI , but could find an option to download as excel  !
    Is there any option in webgui ?
    Please provide you valuable inputs !
    Thanks.,
    V.Rangarajan

    Hi V.Ranjarajan,
    Have you created an ALV report?
    If yes, there are many ways to download the output to excel:
    Go to Menu -> Export - > Local File... , local file button, etc.
    In SAP CRM 7.0 there is a std functionality to even download search result list to excel.
    Hope this helps!
    Regards,
    Saumya

  • Problem while downloading the alv output to excel file.

    Hii,
    While downloading the alv output to an excel file i am facing a problem. Either the output comes as 1.23456E+11 or the values get cut .
    Cant put in txt file  as the users require to calculate directy and i have even tried to increase the output length .But both doesnt help.
    So what are the other ways to do so.
    Edited by: mansi_v27 on Mar 24, 2010 12:35 PM

    Hi,
    Welcome to SCN!!!.
    Please go through the forum rules. This has been discussed many times. You can search in the forum for this.
    Infact there is no problem. Just expand that excel cell. You can see the full value. This is standard excel property.
    Thanks,
    Vinod.

  • ITS screen hangs when downloading a report to an excel from an ITS screen

    Hi All,
    We are having an Transaction iview which is used by manager to generate reports, When the user tries to download the report to a local file the screen just hangs and nothing happens. We get an error at the IE status bar saying "Load: class Query not found". This the same when the user tries to upload selection criteria from an text file to execute the report. We are running EP7 with ECC5 as backend with Integrated ITS.
    Both the functionalities works when the report is executed in the backend.
    Regards
    Prakash

    Hi All,
    I found about a OSS note 980772 in one of the threads (ITS: issues with downloading ALV)
    which mentions about the SUN Virtual Machine and downloading and uploading of files.
    After i made the changes it worked for me.
    Regards
    Prakash

  • Download the grid output to excel sheet

    Hi Friends,
    i have generated an ALV GRID report, in that its showing 800+ records, but when i download that  to excel sheet 25 odd records are missing in the between,
    i have downloaded through local file -
    > to spreadsheet.
    Can you please tell me the error.
    Regards
    Kumar M

    hi kumar,
    have generated an ALV GRID report, in that its showing 800+ records, but when i download that to excel sheet 25 odd records are missing in the between,
    i have downloaded through local file -
    > to spreadsheet.
    Can you please tell me the error.
    how u solved this problem  same problem  i am also getting plz tell me the solution.
    Thanks & Regards,
    Ravi.

  • Convert the matrix report output to excel sheet

    Hi,
    I am using reports 6i and database Oracle Database 10g Enterprise Edition Release 10.2.0.1.0.
    I have to convert the output of matrix report into Excel sheet.
    Is it possible.
    Is there any other way to populate the matrix data to the excel sheet.
    Thanks and regards,
    Ansaf.

    You can generate excel file by setting SYSTEM PARAMETER values as below
    DESFORMAT - DELIMITED
    DESTYPE -FILE
    DESNAME -File Name.XLS
    Although this is not a pure Excel file (Its only a tab delimited file) but you can open this with MSExcel or Open office Calc.
    Regards
    Ahamed Rafeeque Cherkala.

  • To download a list output to excel sheet

    Hi All,
    I am running the transaction MD47 for Product Group Planning.
    I get a list output with as many as 90 columns.
    When I try to download the output into an excel (System > List > Save > Local File ) only the columns which appear on the screen are being downloaded. Does any one have pointers on how can I download the whole list into an excel?
    Regards,
    Karthik

    Hey Gabriel,
    I am doing good. How are you today?
    How do I do that?
    This is a list output not an ALV. I dint find any option to choose an ALV layout.
    Regards,
    Karthik

  • 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,
    Rachel

    Hi 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

Maybe you are looking for

  • Synching loops

    Hi all, I have a difficulty in getting loops to synch, I'll try to describe the problem as best I can. I have a finished song in Logic 9. One of the tracks contains a drum loop. This is created using one of the sample loops I dragged onto the arrange

  • How can i debug a rfc being called from sap

    hello Gurus, We made a RFC call from SAP r3 to sap grc nfe......we did not receive any data in sap grc .......we go to SM58 and there it gives the message "Name or password is incorrect (repeat logon)u201D. How can i find out where the data has stuck

  • Tax code error - Message no. F5 113

    Dear Team, I am facing an error message while changing the tax rate for specific country. The entry was already existing and only the rate was changed. When trying to post an invoice the error message appears: Acct determination not defined for trans

  • Deploying visual studio 2008 project with crystal reports

    I have deployed an application using ClickOnce.  The application works except that I am getting a "Load Report failed" error.  I am able to view reports on my developer machine, but when I deploy it I get the error. What causes this and how can I fix

  • I do not use iPhoto at all.

    How can I delete the photos from my HD? I am have iPhoto 8.1.2 and am running OSX 10.9.4 on my mid 2010 iMac 21.5" unit. I keep all my photos on an external drive and want to clear up the space on my computer. Can I just trash the iPhoto library and