ALV Report Export to Excel

Hi experts,
I generated ALV report with proper data information but when I export it to excel with this path List->Export->Local File->Spreadsheet.
All the data I get perfectly expecting the Mobile no. filed. In my ALV report I got mobile no field with 91(Mob. No). wx.919876543210. But when I export it to excel then I got 919876543210, not able to get +.
So kindly suggest me if any option is there.!!!!

Hi,
Declare the Mobile number field as a Character field and append it to the Final output table and download it using 'GUI_DOWNLOAD' and make sure that the file type is 'DBF'.
Below is the sample code to save the output as a local file in your system.
TYPES: BEGIN OF ty_output,
        mob(20) TYPE c,
       END OF ty_output.
DATA: BEGIN OF it_title OCCURS 2,
      title(100),
      END OF it_title,
      gt_output TYPE TABLE OF ty_output WITH HEADER LINE,
      wa_layout TYPE slis_layout_alv,
      wa_fldcat TYPE slis_fieldcat_alv,
      gt_fldcat TYPE TABLE OF slis_fieldcat_alv,
      ofname TYPE string.
gt_output-mob = '+919876543210'.
APPEND gt_output.
gt_output-mob = '+91123456789'.
APPEND gt_output.
CONCATENATE 'D:\temp\' 'MOBILE_' sy-uzeit '.xls' INTO OFNAME.
it_title-title = 'Mobile Num'.
APPEND it_title.
CALL FUNCTION 'GUI_DOWNLOAD'
  EXPORTING
    filename              = ofname
    filetype              = 'DBF'
    write_field_separator = 'X'
  TABLES
    data_tab              = gt_output
    fieldnames            = it_title.
IF sy-subrc = 0.
ENDIF.
Please reward if the solution is useful.

Similar Messages

  • 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

  • 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

  • Need to send ALV Report as an Excel sheet via Email

    Well , I need to Email an ALV Report as an Excel Sheet using my program. What do I need to do and how?
    Answers will be rewarded with points.
    Thanks

    Hi Manu,
    You can copy and paste the following codes and try to execute..
    Hope this will help you..
    note: dont forget to change 'SAPUSER' to your SAP user id.
    REPORT  yhn_test8                               .
    TYPE-POOLS: slis, slist, truxs.
    DATA t5         LIKE t005t OCCURS 0 WITH HEADER LINE.
    DATA fcat       TYPE slis_t_fieldcat_alv.
    DATA listobject LIKE abaplist OCCURS 0 WITH HEADER LINE.
    DATA stack      TYPE slist_listlevel_stack WITH HEADER LINE.
    DATA ttxt       LIKE solisti1 OCCURS 0 WITH HEADER LINE.
    PARAMETER p_alv   RADIOBUTTON GROUP a.
    PARAMETER p_excel RADIOBUTTON GROUP a.
    START-OF-SELECTION.
      SELECT * INTO TABLE t5
               FROM t005t
              WHERE spras = sy-langu.
      CLEAR : fcat, fcat[].
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name       = 'T005T'
        CHANGING
          ct_fieldcat            = fcat
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
      IF p_alv = 'X'.
        CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
          EXPORTING
            it_fieldcat   = fcat
          TABLES
            t_outtab      = t5
          EXCEPTIONS
            program_error = 1
            OTHERS        = 2.
        IF sy-subrc <> 0.
        ENDIF.
      ELSEIF p_excel = 'X'.
        CALL FUNCTION 'LIST_FREE_MEMORY'.
        SUBMIT yhn_test8 EXPORTING LIST TO MEMORY AND RETURN.
        CALL FUNCTION 'LIST_FROM_MEMORY'
          TABLES
            listobject = listobject
          EXCEPTIONS
            not_found  = 1
            OTHERS     = 2.
        IF sy-subrc = 0.
        Generate LIST for excel file
          CALL FUNCTION 'LIST_TO_TXT'
            TABLES
              listtxt            = ttxt
              listobject         = listobject
            EXCEPTIONS
              empty_list         = 1
              list_index_invalid = 2
              OTHERS             = 3.
          IF sy-subrc = 0.
            LOOP AT ttxt.
              REPLACE ALL OCCURRENCES OF '|' IN ttxt-line
                      WITH cl_abap_char_utilities=>horizontal_tab.
              MODIFY ttxt.
            ENDLOOP.
            PERFORM send_email.
          ENDIF.
        ENDIF.
      ENDIF.
    *&      Form  send_email
    FORM send_email .
      DATA docs LIKE docs OCCURS 0 WITH HEADER LINE.
      DATA excelsize TYPE i.
      DATA excel LIKE solisti1   OCCURS 0 WITH HEADER LINE.
      DATA doc LIKE sodocchgi1.
      DATA excelln TYPE i.
      DATA int_objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
      DATA int_objhead LIKE solisti1   OCCURS 2 WITH HEADER LINE.
      DATA int_objtext LIKE solisti1   OCCURS 0 WITH HEADER LINE.
      DATA int_reclist LIKE somlreci1  OCCURS 1 WITH HEADER LINE.
      DATA bodyln LIKE sy-tabix.
      DATA output_data TYPE ssfcrescl.
      excel[] = ttxt[].
    excel table sizes
      DESCRIBE TABLE excel LINES excelln.
    Body Email
      int_objtext-line = 'Test Body'.
      APPEND int_objtext.
      DESCRIBE TABLE int_objtext LINES bodyln.
      READ     TABLE int_objtext INDEX bodyln.
      CLEAR doc.
      doc-doc_size   = ( bodyln - 1 ) * 255 + STRLEN( int_objtext ).
      doc-obj_name   = ' '.
      doc-sensitivty = 'P'.
      doc-proc_syst  = sy-sysid.
      doc-proc_clint = sy-mandt.
      CLEAR: int_objpack, int_objpack[].
      int_objpack-transf_bin = ' '.
      int_objpack-head_start = 1.
      int_objpack-head_num   = 0.
      int_objpack-body_start = 1.
      int_objpack-body_num   = bodyln.
      int_objpack-doc_type   = 'RAW'.
      int_objpack-obj_descr  = 'Test'.
      APPEND int_objpack.
      CLEAR: int_objhead, int_objhead[].
      int_objhead            = 'Attachment'.
      APPEND int_objhead.
      int_objpack-transf_bin = 'X'.
      int_objpack-head_start = 1.
      int_objpack-head_num   = 0.
      int_objpack-body_start = 1.
      int_objpack-body_num   = excelln.
      int_objpack-doc_size   = excelsize.
      int_objpack-doc_type   = 'XLS'.
      int_objpack-obj_name   = 'excel'.
      int_objpack-obj_descr  = 'test.xls'. "File name
      APPEND int_objpack.
      Set Receiver
      int_reclist-receiver   = 'SAPUSER'.
      int_reclist-rec_type   = 'B'.
      int_reclist-notif_del  = 'X'.
      int_reclist-notif_read = 'X'.
      int_reclist-notif_ndel = 'X'.
      int_reclist-express    = 'X'.
      APPEND int_reclist.
      doc-obj_descr = 'Report in Excel'.
      Sending Email
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          document_data              = doc
          put_in_outbox              = 'X'
          commit_work                = 'X'
        TABLES
          packing_list               = int_objpack
          object_header              = int_objhead
          contents_bin               = excel
          contents_txt               = int_objtext   "Body
          receivers                  = int_reclist
        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.
    ENDFORM.                    " send_email

  • ALV grid export to Excel 2003-f.01

    Hi all,
    I have an issue with ALV grid export to excel 2003 ,when i tried to download with the option as local file > xls file ,the report downloads with page breaks which the user does not want , each break comeswith header .
    With the option of list>export>xml sheet - the report downloads with out page break but with no header information like the name of the report and reporting period .The tcode is f.01 and the system is ECC6.
    Can any one suggest  how to download the report with tiltle of the report with no page break ?
    Thanks
    ske

    Hi
    What happens if you use the export/local file option - does that help at all or can you change the layout? Haven't got access to your release to check.
    Cheers
    David
    Edited by: David Berry on Oct 28, 2010 9:38 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

  • Access Report exporting to Excel Horizontally

    I've got a rather large report in Access, based on a couple of forms.
    When i preview it looks fine, Textboxes are all in order with the make and model then the data in text boxes in a column below.
    There are 7 columns of text boxes like this.
    When I export to a PDF, it's in the right format, 7 columns next to each other.
    When I export to Word and even a text file it works fine.
    When I export to Excel, they all go horizontal...textbox name in row 1 and all the data in row 2, clear to column IV and that's it.
    What am I doing wrong?
    Thank you for any help.
    Gee

    Hi Gee,
    According to the desription, when the report exported to Excel, the layout is incorrect.
    Based on my test, the Access doesn't export the textbox into Excel, it just export the data in the report. Here are the test steps for your reference:
    1. Create a table with some fields in Access 2013
    2. Create a reprot based on the table by default
    3. Export the report to Excel by External data->Export->Excel
    Did I misunderstood? Also a demo database to help us reproduce this issue is much appreciate.
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Hyperion Workspace Financial Reporting Export to Excel Query-Ready Missing

    Hyperion Workspace Financial Reporting Export to Excel "Query-Ready" option is Missing in the dropdown when you go to File>Export>Excel
    Only the "Fully Formatted" option is available.
    From what I recall this option for a "query-ready" export should be available from the HTML preview?
    Is there something in configuration that needs to be enabled or something that needs to be checked on to get this option?
    We are running 11.1.1.3
    The Query-Ready option is available when exporting forms in Planning.
    When opening Financial Reports in Smartview the option for "Query-Ready" is available.
    For some reason this is not showing up in workspace, does it not exist in 11.1.1.3? Is this a bug?
    TIA

    Hi,
    The option to export the financial report output in "Query-Ready" format is actually at the bottom right hand corner of the report page (look at the report footer) instead of File>Export>Excel.
    Hope this helps
    Genti

  • Web report Export to Excel Issue

    Hi,
    I've tried to look at one of the issues already logged about the Export to Excel functionality and I was not able to find a solution to my problem.
    In my organization we are using BW 3.5. And when I run a web report, and try to export to excel a 15000 line report, I'm always getting only the first 400 or 500 rows. If I go to the last line and try to do the same, I will then get the full report exported to excel.
    Any idea why this is happening?
    Thanks,
    JS

    Try to run the report using the 0ANALYZER template and see whether you can replicate the issue.  If the behavior is same with 0ANALYZER then it will be a issue with SAP code.

  • Access report export to excel shows =sum() text boxes prefixed with the textbox name

    When exporting reports from access to excel the =sum() (group and total sums) text boxes all have the text box name prefixed to them in excel. They look good in access reports. Any way to turn this off? Why is this happening?
    I've seen the same issue on 2 computers running Access 2010. I also tried this in access 2013 and had the same issue.
    See the images below as examples, the first is from access, the second is the report exported to excel.
    Access 2010 (http://i.stack.imgur.com/4roFM.png)
    Exported report viewed in Excel 2010 (http://i.stack.imgur.com/6B1zj.png)

    I've seen the same issue on 2 computers running Access 2010. I also tried this in access 2013 and had the same issue.
    Hi Scott,
    Did you use the same database file? May I know how did you create the report and those TextBoxes?
    I couldn't reproduce your problem, this is what I did:
    Create a sample table and the corresponding report. Group it by one of the field, then give it a footer section. In the footer section I inserted a TextBox and set the ControlSource property to "=Sum([fieldname])". But the name of the TextBox didn't
    show in the exported Excel file. Check the screenshots here:
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • SSRS report export to excel

    Hi All,
    I have one developed SSRS report which is a matrix report (having customer name in column area and customer code in row area);
    and it is working ok no issue here. 
    Now I want to do something like :
    Is it possible while exporting to excel, I can interchange rows data to columns data and columns data to rows data ? (so that customer name comes in row area; and customer code comes in column area)
    Hope question is straight forward and clear.
    Regards 

    Hi ,
    I have tried to do dynamic grouping based on the Format of rendering, however in dynamic grouping not allowed to use the Global Built-In Fields, Variables, ReportItems collections.
    Finally only way left for us to use our classical trick to set the visibility on and off.
    This trick can be applied by creating two different Matrix and show one matrix depending on Format rendering.
    My trick is to create two groups within the matrix and hide and show one group based on format rendering.
    I have created detailed level of post in below link.
    https://msbitips.wordpress.com/2015/04/21/ssrs-transpose-columns-of-a-report-dynamically-when-rendering-in-different-format/
    RDL for your reference:-
    <?xml version="1.0" encoding="utf-8"?>
    <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
    <Body>
    <ReportItems>
    <Textbox Name="textbox1">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>SSRS report export to excel</Value>
    <Style>
    <FontFamily>Tahoma</FontFamily>
    <FontSize>14pt</FontSize>
    <FontWeight>Bold</FontWeight>
    <Color>SteelBlue</Color>
    </Style>
    </TextRun>
    </TextRuns>
    <Style>
    <TextAlign>Center</TextAlign>
    </Style>
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>textbox1</rd:DefaultName>
    <Height>0.36in</Height>
    <Width>5in</Width>
    <Style>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    <Tablix Name="Tablix2">
    <TablixCorner>
    <TablixCornerRows>
    <TablixCornerRow>
    <TablixCornerCell>
    <CellContents>
    <Textbox Name="Textbox14">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>Customer Code</Value>
    <Style />
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox14</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCornerCell>
    </TablixCornerRow>
    </TablixCornerRows>
    </TablixCorner>
    <TablixBody>
    <TablixColumns>
    <TablixColumn>
    <Width>1in</Width>
    </TablixColumn>
    <TablixColumn>
    <Width>1in</Width>
    </TablixColumn>
    </TablixColumns>
    <TablixRows>
    <TablixRow>
    <Height>0.25in</Height>
    <TablixCells>
    <TablixCell>
    <CellContents>
    <Textbox Name="Textbox18">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Sum(Fields!Result.Value)</Value>
    <Style />
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox18</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    <TablixCell>
    <CellContents>
    <Textbox Name="Textbox16">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value />
    <Style />
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox16</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    </TablixCells>
    </TablixRow>
    <TablixRow>
    <Height>0.25in</Height>
    <TablixCells>
    <TablixCell>
    <CellContents>
    <Textbox Name="Textbox19">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value />
    <Style />
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Textbox19</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    <TablixCell>
    <CellContents>
    <Textbox Name="Result">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Sum(Fields!Result.Value)</Value>
    <Style />
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>Result</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixCell>
    </TablixCells>
    </TablixRow>
    </TablixRows>
    </TablixBody>
    <TablixColumnHierarchy>
    <TablixMembers>
    <TablixMember>
    <Group Name="CustomerCode1">
    <GroupExpressions>
    <GroupExpression>=Fields!CustomerCode.Value</GroupExpression>
    </GroupExpressions>
    </Group>
    <SortExpressions>
    <SortExpression>
    <Value>=Fields!CustomerCode.Value</Value>
    </SortExpression>
    </SortExpressions>
    <TablixHeader>
    <Size>0.25in</Size>
    <CellContents>
    <Textbox Name="CustomerCode1">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!CustomerCode.Value</Value>
    <Style />
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>CustomerCode1</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixHeader>
    <Visibility>
    <Hidden>=IIF(Globals!RenderFormat.Name="EXCEL",false,true)</Hidden>
    </Visibility>
    </TablixMember>
    <TablixMember>
    <Group Name="customerName">
    <GroupExpressions>
    <GroupExpression>=Fields!customerName.Value</GroupExpression>
    </GroupExpressions>
    </Group>
    <SortExpressions>
    <SortExpression>
    <Value>=Fields!customerName.Value</Value>
    </SortExpression>
    </SortExpressions>
    <TablixHeader>
    <Size>0.25in</Size>
    <CellContents>
    <Textbox Name="customerName">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!customerName.Value</Value>
    <Style />
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>customerName</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixHeader>
    <Visibility>
    <Hidden>=IIF(Globals!RenderFormat.Name="EXCEL",true,false)</Hidden>
    </Visibility>
    </TablixMember>
    </TablixMembers>
    </TablixColumnHierarchy>
    <TablixRowHierarchy>
    <TablixMembers>
    <TablixMember>
    <Group Name="customerName1">
    <GroupExpressions>
    <GroupExpression>=Fields!customerName.Value</GroupExpression>
    </GroupExpressions>
    </Group>
    <SortExpressions>
    <SortExpression>
    <Value>=Fields!customerName.Value</Value>
    </SortExpression>
    </SortExpressions>
    <TablixHeader>
    <Size>1in</Size>
    <CellContents>
    <Textbox Name="customerName1">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!customerName.Value</Value>
    <Style />
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>customerName1</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixHeader>
    <Visibility>
    <Hidden>=IIF(Globals!RenderFormat.Name="EXCEL",false,true)</Hidden>
    </Visibility>
    </TablixMember>
    <TablixMember>
    <Group Name="CustomerCode">
    <GroupExpressions>
    <GroupExpression>=Fields!CustomerCode.Value</GroupExpression>
    </GroupExpressions>
    </Group>
    <SortExpressions>
    <SortExpression>
    <Value>=Fields!CustomerCode.Value</Value>
    </SortExpression>
    </SortExpressions>
    <TablixHeader>
    <Size>1in</Size>
    <CellContents>
    <Textbox Name="CustomerCode">
    <CanGrow>true</CanGrow>
    <KeepTogether>true</KeepTogether>
    <Paragraphs>
    <Paragraph>
    <TextRuns>
    <TextRun>
    <Value>=Fields!CustomerCode.Value</Value>
    <Style />
    </TextRun>
    </TextRuns>
    <Style />
    </Paragraph>
    </Paragraphs>
    <rd:DefaultName>CustomerCode</rd:DefaultName>
    <Style>
    <Border>
    <Color>LightGrey</Color>
    <Style>Solid</Style>
    </Border>
    <PaddingLeft>2pt</PaddingLeft>
    <PaddingRight>2pt</PaddingRight>
    <PaddingTop>2pt</PaddingTop>
    <PaddingBottom>2pt</PaddingBottom>
    </Style>
    </Textbox>
    </CellContents>
    </TablixHeader>
    <Visibility>
    <Hidden>=IIF(Globals!RenderFormat.Name="EXCEL",true,false)</Hidden>
    </Visibility>
    </TablixMember>
    </TablixMembers>
    </TablixRowHierarchy>
    <DataSetName>DataSet1</DataSetName>
    <Top>0.53in</Top>
    <Left>0.5925in</Left>
    <Height>0.75in</Height>
    <Width>3in</Width>
    <ZIndex>1</ZIndex>
    <Style>
    <Border>
    <Style>None</Style>
    </Border>
    </Style>
    </Tablix>
    </ReportItems>
    <Height>1.51958in</Height>
    <Style />
    </Body>
    <Width>5in</Width>
    <Page>
    <LeftMargin>1in</LeftMargin>
    <RightMargin>1in</RightMargin>
    <TopMargin>1in</TopMargin>
    <BottomMargin>1in</BottomMargin>
    <Style />
    </Page>
    <AutoRefresh>0</AutoRefresh>
    <DataSources>
    <DataSource Name="DS">
    <DataSourceReference>DS</DataSourceReference>
    <rd:SecurityType>None</rd:SecurityType>
    <rd:DataSourceID>36063f24-6742-4f6a-a067-0e7a60156149</rd:DataSourceID>
    </DataSource>
    </DataSources>
    <DataSets>
    <DataSet Name="DataSet1">
    <Query>
    <DataSourceName>DS</DataSourceName>
    <CommandText>select 'customer1' customerName,'Code1'CustomerCode,11 Result
    union
    select 'customer1' customerName,'Code2'CustomerCode,14 Result
    union
    select 'customer1' customerName,'Code3'CustomerCode,17 Result
    union
    select 'customer2' customerName,'Code1'CustomerCode,12 Result
    union
    select 'customer2' customerName,'Code2'CustomerCode,15 Result
    union
    select 'customer2' customerName,'Code3'CustomerCode,18 Result</CommandText>
    <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
    </Query>
    <Fields>
    <Field Name="customerName">
    <DataField>customerName</DataField>
    <rd:TypeName>System.String</rd:TypeName>
    </Field>
    <Field Name="CustomerCode">
    <DataField>CustomerCode</DataField>
    <rd:TypeName>System.String</rd:TypeName>
    </Field>
    <Field Name="Result">
    <DataField>Result</DataField>
    <rd:TypeName>System.Int32</rd:TypeName>
    </Field>
    </Fields>
    </DataSet>
    </DataSets>
    <Language>en-US</Language>
    <ConsumeContainerWhitespace>true</ConsumeContainerWhitespace>
    <rd:ReportUnitType>Inch</rd:ReportUnitType>
    <rd:ReportID>3c1c52a7-70c0-4ed8-8f18-f621ef973a48</rd:ReportID>
    </Report>
    Thanks
    Prasad

  • Ssrs report export to excel along with parameter filters

    HI,
    In ssrs reports export to excel along with parameter filters,is it possible or not?
    Could you please help me..
    indu

    Hi Sriindu,
    According to your description, you want to export the report into an excel file with the report parameter and filters. And you want to filter data in excel. Right?
    In Reporting Services, the components for exporting report into a file called Reporting Services Rendering Extension. There are three types of Reporting Services rendering extensions: Data Render Extension,
    Soft page-break renderer extensions, Hard page-break rendering extensions. All these three extension are only for rendering data. It can't keep the filters and parameter in the report. Also excel can't support Reporting Services filter in
    an excel file. So your requirement can't be achieved.
    Reference:
    Exporting Reports (Report Builder and SSRS)
    Interactive Functionality for Different Report Rendering Extensions (Report Builder and SSRS)
    If you have any feedback on our support, please click
    here.
    Best Regards,
    Simon Hou

  • ALV List export to Excel when program is run in background

    Hello,
    I am running into an issue with a custom ALV report which contains an export to Excel option on the input screen. However, when I attempt to run the report in background due to high volume of records/expected performance constraints, the job fails to produce a spool when the "export to Excel" option is selected. When I deselect that option, the background job successfully generates a spool, which I can then export to Excel (albeit the formatting will not look the same).
    Is the above an accurate statement or does anyone know of a way where either;
    1) The background job can create and store the Excel output into a cached directory?
    2) The spool generated, when exported to Excel, can match the format of the foreground Excel output?
    Thanks in advancce.

    Check out the sample program of the provided link ..
    http://www.sap-img.com/abap/download-in-background-in-excel-format.htm

  • ALV GRID Export to Excel button Missing

    HI All,
    I am facing some problem with ALV GRID. When excuting the report with my user id I am able to see the 'Export to Local file' button in the ALV GRID where as if i am excuting with another user id which is having less authorisations than the button is greyed out.  I checked by giving all authorisation than we are able to see the button.
    Could anyone please tell me which authorisation object we have to assign to see the buttons.
    Thanks & Regards,
    Murali.

    Hi,
    Before clicking on the Export to Excel button, start the debugging session by placing the command /H in the command prompt.
    Now, put the break point at statement AUTHORITY-CHECK. Now it will trigger all the authorization objects relevant to this.
    check the sy-subrc value gets failed.
    Regards,
    Santhosh.

  • Colored ALV to export for excel with the colors

    Friends,
    Would they like to know how I can export a colored ALV for EXCEL, including the colors.
    Thanks

    I shall divide the question into two parts
    a) <b>Export ALV report to Excel</b>
    b) <b>Retain colours of ALV in excel</b>
    If you know how to do a), I guess I would just be waiting like you for some person to throw light on how to to <b>retain colours of ALV in Excel</b>.
    Regards,
    Subramanian V.

Maybe you are looking for

  • Purchase Order from Requisition

    My scenario is:     I need to create a Purcahase Order based on Purchase Requisition as i need to add one new line item as a sample in the line item.If anybody has worked on the similar kind of scenario...kindly help me. This is related to transactio

  • Text in column 2 starts under the lowest line of column 1?

    Hello, i posted this question also in the Dutch forum, but there are not so many viewers in there, and now i found this forum. I have a problem with Dreamweaver CS4 (i am still very new with DW, but manage to create something) I am working with CS4 a

  • Shrinking BLOB tablespace in Oracle 10g

    Hello, I have table created with 32 GB in Oracle 10g with BLOB field containing images. after that I have deleted some of the images from the table but when I'm checking free space, it is show full 32 GB. But when I'm looking at Toad it shows me out

  • Calendar Error - "You response to the invitation cannot be sent."

    I'm not sure why, but for some reason when I replied on my iPone to a single instance of a recurring meeting request (change in the "location"), I started getting this error message when I had either mail or calendar open.  I currently have my compan

  • Generating tables from database

    Hello, What Im trying to do is generate table information from my database. What Im doing right now is retrieving the information this way, which is combersome because alot of pages would be different because they dont all have the same number of col