GUI_DOWNLOAD with XLS format Issue

Hi,
I am using gui_download option to download my final internal table to excel sheet. But when i tried to open the downloaded file it gives me the pop up saying "THE FILE WHICH YOU ARE TRYING TO OPEN IS IN THE DIFFERENT FORMAT THAN SPECIFIED BY THE FILE EXTENSION' and I used ASC as a file type and file name with XLS extension. I would like to know how to avoid this pop up message. I tried to use other function module which is for the excel download but it does not have parameter for the custom header records. Can anyone suggest how to solve the issue ?
Some of the other function module I tried for the excel download but they have certain limitations like the all the fields should be in Char format to populate the header. But my fieldls in the internal table is the dynamic one based on the condition check. It would be great if anyone suggests with suitable answer.
Thanks,
Ram

Hi all,
I have been facing the same problem a few days back.
I tried multiple things and found that there are multiple ways for achieving this.
One fo the options is the one suggested by "remitra_cap".
The other option is to use FM 'SAP_CONVERT_TO_XLS'.
The advantage of this FM is its simple and u don't have to convert anything u just pass the File name and the internal table and u have a native Excel ready.A fast and simple method.
The limitation of the above FM is that ur GUI should be above 7.2.
IF it is then this is the best option.
One more way to accomplish the same is to use OLE.
The advantage of using OLE is it creates a native excel and you have all possible options which are in excel.
But the disadvantage of using OLE is it takes long to generate based on the data to be populated.
U will get many examples on the net for OLE
IF the format of the file u need generate is fixed then u can go for BDS.
BDS is also a fast method.
May this help u.
Cheers.

Similar Messages

  • ALV grid to excel (.XLS) format issue

    im trying to export an ALV grid to excel file using FM 'GUI_DOWNLOAD'.
    the output  is located at the link  below:
    http://img393.imageshack.us/my.php?image=excelproblemjt4.jpg
    some how the fields arent inside the individual boxes..
    can anyone provide me with the solution? thanks
    below are the codes of how i implement the 'GUI DOWNLOAD' FM
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename   = lv_file        " C:\filename.xls
          write_field_separator = 'X'
        IMPORTING
          filelength = lv_size
        TABLES
          data_tab   = ltt_data

    REPORT  test0012                                                  .
    INCLUDE test_top.
    INCLUDE test_f01.
    INCLUDE test_alv.
          START OF SELECTION
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM process_data.
    END-OF-SELECTION.
      IF tt_output IS NOT INITIAL.
        PERFORM prepare_excel_data.
    Download CSV file to local
        IF c_loc = 'X'.
         PERFORM convert_to_xls.
          PERFORM download_local.
        ENDIF.
      ELSE.
    Show Message when no records selected
       MESSAGE I016 WITH TEXT-005.
      ENDIF.
      PERFORM f_alv_disp.
    *&  Include           test_TOP                                   *
    TABLES: vbrk, vbrp, vbak, vbap, kna1.
    DATA: total_value TYPE p DECIMALS 2 LENGTH 15.
    DATA: total TYPE c LENGTH 5 VALUE 'total'.
    TYPE-POOLS
    TYPE-POOLS: slis, truxs.
    -ALV----
    DATA:
      wa_alv_layout       TYPE slis_layout_alv,
      tt_alv_fieldcat     TYPE slis_t_fieldcat_alv WITH HEADER LINE,
    tt_alv_sort         TYPE slis_t_sortinfo_alv WITH HEADER LINE,
      tt_alv_events       TYPE slis_t_event WITH HEADER LINE,
      wa_sort             TYPE slis_sortinfo_alv,
      tt_sort             TYPE slis_t_sortinfo_alv,
      v_pagno             TYPE sy-pagno,
      s_keyinfo           TYPE slis_keyinfo_alv.
    TYPES
    TYPES: BEGIN OF vbrk,
            vbeln TYPE vbrk-vbeln,
            fkdat TYPE vbrk-fkdat,
            vkorg TYPE vbrk-vkorg,
            vtweg TYPE vbrk-vtweg,
            spart TYPE vbrk-spart,
            kunag TYPE vbrk-kunag,
           END OF vbrk,
           BEGIN OF vbrp,
            vbeln TYPE vbrp-vbeln,
            aubel TYPE vbrp-aubel,
            vgbel TYPE vbrp-vgbel,
            aupos TYPE vbrp-aupos,
           END OF vbrp,
           BEGIN OF vbak,
            vbeln TYPE vbak-vbeln,
            auart TYPE vbak-auart,
            bstnk TYPE vbak-bstnk,
           END OF vbak,
           BEGIN OF vbap,
            vbeln TYPE vbap-vbeln,
            posnr TYPE vbap-posnr,
            netwr TYPE vbap-netwr,
            mwsbp TYPE vbap-mwsbp,
           END OF vbap,
           BEGIN OF kna1,
            kunnr TYPE kna1-kunnr,
            name1 TYPE kna1-name1,
           END OF kna1,
           BEGIN OF output,
            fkdat TYPE vbrk-fkdat,
            vkorg TYPE vbrk-vkorg,
            vtweg TYPE vbrk-vtweg,
            spart TYPE vbrk-spart,
            kunag TYPE vbrk-kunag,
            name1 TYPE kna1-name1,
            auart TYPE vbak-auart,
            bstnk TYPE vbak-bstnk,
            aubel TYPE vbrp-aubel,
            vgbel TYPE vbrp-vgbel,
            total LIKE total_value,
           END OF output.
    Type for download to excel use.
    TYPES: BEGIN OF ty_excel,
             col1(20), sp01,
             col2(25), sp02,
             col3(23), sp03,
             col4(14), sp04,
             col5(15), sp05,
             col6(23), sp06,
             col7(13), sp07,
             col8(25), sp08,
             col9(20), sp09,
             col10(30), sp10,
             col11(13),
           END OF ty_excel.
    DATA: wa_vbrk TYPE vbrk,
          wa_vbrp TYPE vbrp,
          wa_vbak TYPE vbak,
          wa_vbap TYPE vbap,
          wa_kna1 TYPE kna1,
          wa_output TYPE output,
          tt_vbrk TYPE STANDARD TABLE OF vbrk,
          tt_vbrp TYPE STANDARD TABLE OF vbrp,
          tt_vbak TYPE STANDARD TABLE OF vbak,
          tt_vbap TYPE STANDARD TABLE OF vbap,
          tt_kna1 TYPE STANDARD TABLE OF kna1,
          tt_output TYPE STANDARD TABLE OF output.
    Table for download to excel use.
    DATA: tt_excel TYPE STANDARD TABLE OF ty_excel,
          wa_excel LIKE LINE OF tt_excel,
          tt_excel_output  TYPE truxs_t_text_data.
         wa_excel type ty_excel.
    Data Declaration for CSV file use
    CONSTANTS : c_comma TYPE c VALUE ','.
    Selection-Screen
    SELECTION-SCREEN BEGIN OF BLOCK b01 WITH FRAME TITLE text-b01.
    SELECT-OPTIONS:  s_fkdat FOR vbrk-fkdat OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b01.
    SELECTION-SCREEN BEGIN OF BLOCK b02 WITH FRAME TITLE text-b02.
    PARAMETERS:      p_vkorg TYPE vbrk-vkorg OBLIGATORY.
    SELECT-OPTIONS:  s_vtweg FOR vbrk-vtweg,
                     s_spart FOR vbrk-spart.
    SELECTION-SCREEN END OF BLOCK b02.
    SELECTION-SCREEN BEGIN OF BLOCK b03 WITH FRAME TITLE text-b03.
    SELECT-OPTIONS:  s_kunag FOR vbrk-kunag.
    SELECTION-SCREEN END OF BLOCK b03.
    SELECTION-SCREEN BEGIN OF BLOCK b04 WITH FRAME TITLE text-b04.
    PARAMETERS:      c_loc AS CHECKBOX,
                     p_file LIKE rlgrap-filename DEFAULT 'C:\filename.txt'.
    SELECTION-SCREEN END OF BLOCK b04.
    *&  Include           test_F01                                   *
    FORM get_data
    FORM get_data.
      DATA: lt_vbrk TYPE STANDARD TABLE OF vbrk,
            lt_vbrp TYPE STANDARD TABLE OF vbrp.
      SELECT vbeln fkdat vkorg vtweg spart kunag
      FROM vbrk
      INTO TABLE tt_vbrk
      WHERE fkdat IN s_fkdat
      AND   vkorg = p_vkorg
      AND   vtweg IN s_vtweg
      AND   spart IN s_spart
      AND   kunag IN s_kunag.
      lt_vbrk[] = tt_vbrk[].
      SORT lt_vbrk BY vbeln.
      IF lt_vbrk[] IS NOT INITIAL.
        SELECT vbeln aubel vgbel aupos
        FROM vbrp
        INTO TABLE tt_vbrp
        FOR ALL ENTRIES IN lt_vbrk
        WHERE vbeln = lt_vbrk-vbeln.
      ENDIF.
      lt_vbrp[] = tt_vbrp[].
      SORT lt_vbrp BY aubel.
      IF lt_vbrp[] IS NOT INITIAL.
        SELECT vbeln auart bstnk
        FROM vbak
        INTO TABLE tt_vbak
        FOR ALL ENTRIES IN lt_vbrp
        WHERE vbeln = lt_vbrp-aubel.
      ENDIF.
      lt_vbrp[] = tt_vbrp[].
      SORT lt_vbrp BY aubel aupos.
      IF lt_vbrp[] IS NOT INITIAL.
        SELECT vbeln posnr netwr mwsbp
        FROM vbap
        INTO TABLE tt_vbap
        FOR ALL ENTRIES IN lt_vbrp
        WHERE vbeln = lt_vbrp-aubel
        AND posnr = lt_vbrp-aupos.
      ENDIF.
      lt_vbrk[] = tt_vbrk[].
      SORT lt_vbrk BY kunag.
      IF lt_vbrk[] IS NOT INITIAL.
        SELECT kunnr name1
        FROM kna1
        INTO TABLE tt_kna1
        FOR ALL ENTRIES IN lt_vbrk
        WHERE kunnr = lt_vbrk-kunag.
      ENDIF.
    ENDFORM.                    "get_data
    *&      Form  process_data
    FORM process_data.
      LOOP AT tt_vbrk INTO wa_vbrk.
        wa_output-fkdat = wa_vbrk-fkdat.
        wa_output-vkorg = wa_vbrk-vkorg.
        wa_output-vtweg = wa_vbrk-vtweg.
        wa_output-spart = wa_vbrk-spart.
        wa_output-kunag = wa_vbrk-kunag.
    read table tt_vbrp into wa_vbrp with key vbeln = wa_vbrk-vbeln.
    if sy-subrc = 0.
       wa_output-aubel = wa_vbrp-aubel.
       wa_output-vgbel = wa_vbrp-vgbel.
    endif.
        READ TABLE tt_kna1 INTO wa_kna1 WITH KEY kunnr = wa_vbrk-kunag BINARY SEARCH.
        IF sy-subrc = 0.
          wa_output-name1 = wa_kna1-name1.
        ENDIF.
        LOOP AT tt_vbrp INTO wa_vbrp WHERE vbeln = wa_vbrk-vbeln.
          wa_output-aubel = wa_vbrp-aubel.
          wa_output-vgbel = wa_vbrp-vgbel.
          READ TABLE tt_vbak INTO wa_vbak WITH KEY vbeln = wa_vbrp-aubel BINARY SEARCH.
          IF sy-subrc = 0.
            wa_output-auart = wa_vbak-auart.
            wa_output-bstnk = wa_vbak-bstnk.
          ENDIF.
          READ TABLE tt_vbap INTO wa_vbap  WITH KEY vbeln = wa_vbrp-aubel
                                                    posnr = wa_vbrp-aupos BINARY SEARCH.
          wa_output-total = wa_vbap-netwr + wa_vbap-mwsbp.
          APPEND wa_output TO tt_output.
        ENDLOOP. "endloop tt_vbrp
      wa_output-total = wa_vbap-netwr + wa_vbap-mwsbp.
    append wa_output to tt_output.
        CLEAR wa_output.
      ENDLOOP.  "endloop vbrk
    ENDFORM.                    "process_data
    *&      Form  APPEND_EXCEL
    FORM append_excel .
      wa_excel-sp01 = wa_excel-sp02 = wa_excel-sp03 =
      wa_excel-sp04 = wa_excel-sp05 = wa_excel-sp06 =
      wa_excel-sp07 = wa_excel-sp08 = wa_excel-sp09 =
      wa_excel-sp10.
      APPEND wa_excel TO tt_excel. CLEAR wa_excel.
    ENDFORM.                    " APPEND_EXCEL
    *&      Form  PREPARE_EXCEL_DATA
    FORM prepare_excel_data .
    List's Header for excel file
      WRITE  'Billing Date'                TO wa_excel-col1.
      WRITE  'Sales Organization'          TO wa_excel-col2.
      WRITE  'Distribution Channel'        TO wa_excel-col3.
      WRITE  'Division'                    TO wa_excel-col4.
      WRITE  'Sold-to Party'               TO wa_excel-col5.
      WRITE  'Name of Sold-to Party'       TO wa_excel-col6.
      WRITE  'Order Type'                  TO wa_excel-col7.
      WRITE  'Customer PO Number'          TO wa_excel-col8.
      WRITE  'Sales Order Number'          TO wa_excel-col9.
      WRITE  'Delivery Order Number'       TO wa_excel-col10.
      WRITE  'Total Value'                 TO wa_excel-col11.
      PERFORM append_excel.
    Item data for excel file.
      LOOP AT tt_output INTO wa_output.
        WRITE  wa_output-fkdat  TO wa_excel-col1.
        WRITE  wa_output-vkorg  TO wa_excel-col2.
        WRITE  wa_output-vtweg  TO wa_excel-col3.
        WRITE  wa_output-spart  TO wa_excel-col4.
        WRITE  wa_output-kunag  TO wa_excel-col5.
        WRITE  wa_output-name1  TO wa_excel-col6.
        WRITE  wa_output-auart  TO wa_excel-col7.
        WRITE  wa_output-bstnk  TO wa_excel-col8.
        WRITE  wa_output-aubel  TO wa_excel-col9.
        WRITE  wa_output-vgbel  TO wa_excel-col10.
        WRITE  wa_output-total TO wa_excel-col11.
        PERFORM append_excel.
      ENDLOOP.
    List's Header for excel file
    CONCATENATE '"' 'Billing Date'           '"'     INTO WA_EXCEL-COL1.
    CONCATENATE '"' 'Sales Organization'     '"'     INTO WA_EXCEL-COL2.
    CONCATENATE '"' 'Distribution Channel'   '"'     INTO WA_EXCEL-COL3.
    CONCATENATE '"' 'Division'               '"'     INTO WA_EXCEL-COL4.
    CONCATENATE '"' 'Sold-to Party'          '"'     INTO WA_EXCEL-COL5.
    CONCATENATE '"' 'Name of Sold-to Party'  '"'     INTO WA_EXCEL-COL6.
    CONCATENATE '"' 'Order Type'             '"'      INTO WA_EXCEL-COL7.
    CONCATENATE '"' 'Customer PO Number'     '"'     INTO WA_EXCEL-COL8.
    CONCATENATE '"' 'Sales Order Number'     '"'     INTO WA_EXCEL-COL9.
    CONCATENATE '"' 'Delivery Order Number'  '"'     INTO WA_EXCEL-COL10.
    CONCATENATE '"' 'Total Value'            '"'     INTO WA_EXCEL-COL11.
    PERFORM APPEND_EXCEL.
    Item data for excel file.
    LOOP AT TT_output INTO WA_output.
       CONCATENATE '"' WA_OUTPUT-FKDAT '"' INTO WA_EXCEL-COL1.
       CONCATENATE '"' WA_OUTPUT-VKORG '"' INTO WA_EXCEL-COL2.
       CONCATENATE '"' WA_OUTPUT-VTWEG '"' INTO WA_EXCEL-COL3.
       CONCATENATE '"' WA_OUTPUT-SPART '"' INTO WA_EXCEL-COL4.
       CONCATENATE '"' WA_OUTPUT-KUNAG '"' INTO WA_EXCEL-COL5.
       CONCATENATE '"' WA_OUTPUT-NAME1 '"' INTO WA_EXCEL-COL6.
       CONCATENATE '"' WA_OUTPUT-AUART '"' INTO WA_EXCEL-COL7.
       CONCATENATE '"' WA_OUTPUT-BSTNK '"' INTO WA_EXCEL-COL8.
       CONCATENATE '"' WA_OUTPUT-AUBEL '"' INTO WA_EXCEL-COL9.
       CONCATENATE '"' WA_OUTPUT-VGBEL '"' INTO WA_EXCEL-COL10.
       CONCATENATE '"' total '"' INTO WA_EXCEL-COL11.
       PERFORM APPEND_EXCEL.
    ENDLOOP.
    ENDFORM.                    " PREPARE_EXCEL_DATA
    *&      Form  Convert_to_xls
    *form Convert_to_xls.
    LOOP AT TT_EXCEL INTO WA_EXCEL.
       MOVE WA_EXCEL TO LTT_DATA-TEXT.
       APPEND LTT_DATA. CLEAR LTT_DATA.
    ENDLOOP.
    LV_FILE = P_FILE.
    CALL FUNCTION 'SAP_CONVERT_TO_XLS_FORMAT'
    EXPORTING
       I_FIELD_SEPERATOR          = ';'
      I_LINE_HEADER              =
       i_filename                 = lv_file
      I_APPL_KEEP                = ' '
    tables
       i_tab_sap_data             = LTT_DATA
    CHANGING
      I_TAB_CONVERTED_DATA       = tt_excel_output
    EXCEPTIONS
      CONVERSION_FAILED          = 1
      OTHERS                     = 2.
    *IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *ENDIF.
    *endform.
    *&      Form  DOWNLOAD_LOCAL
    FORM download_local .
      TYPES:
          BEGIN OF lty_data,
            text(800),
          END OF lty_data.
      DATA:
        lv_file  TYPE string,
        lv_size  TYPE i,
        lv_msg   TYPE bapi_msg,
        ltt_data TYPE STANDARD TABLE OF lty_data WITH HEADER LINE.
      LOOP AT tt_excel INTO wa_excel.
        MOVE wa_excel TO ltt_data-text.
        APPEND ltt_data. CLEAR ltt_data.
      ENDLOOP.
      lv_file = p_file.
    CONCATENATE LV_FILE 'file.csv' INTO LV_FILE.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename   = lv_file
          write_field_separator = 'X'
          FILETYPE   = 'ASC'
        IMPORTING
          filelength = lv_size
        TABLES
          data_tab   = ltt_data
        EXCEPTIONS
          OTHERS     = 1.
      IF sy-subrc EQ 0.
        "File &1 downloaded successfully - &2 bytes transferred
        MESSAGE e419(3e) WITH lv_file lv_size INTO lv_msg.      "#EC *
      ELSE.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 INTO lv_msg.
      ENDIF.
    WRITE LV_MSG.
    ENDFORM.                    " DOWNLOAD_LOCAL
    *ENDIF.
    *&  Include          test_ALV                                   *
    FORM build_layout .
    wa_alv_layout-zebra           = 'X'.
      wa_alv_layout-colwidth_optimize = 'X'.
      wa_alv_layout-window_titlebar = sy-title.
    ENDFORM.                    " build_layout
    *&      Form  f_build_event
          text
    -->  p1        text
    <--  p2        text
    FORM f_build_event .
      REFRESH tt_alv_events.
      tt_alv_events-name = slis_ev_top_of_page.
      tt_alv_events-form = slis_ev_top_of_page.
      APPEND tt_alv_events.
      CLEAR tt_alv_events.
      tt_alv_events-name = slis_ev_top_of_list.
      tt_alv_events-form = slis_ev_top_of_list.
      APPEND tt_alv_events.
      CLEAR tt_alv_events.
    ENDFORM.                    " f_build_event
    *&      Form  f_alv_disp
          text
    -->  p1        text
    <--  p2        text
    FORM f_alv_disp.
      DATA lv_repid TYPE sy-repid.
      REFRESH: tt_alv_fieldcat, tt_alv_events.
      PERFORM build_layout.
      PERFORM f_build_event.
      lv_repid = sy-repid.
      PERFORM f_build_fieldcat_summary.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = lv_repid
          is_layout          = wa_alv_layout
          it_fieldcat        = tt_alv_fieldcat[]
          I_GRID_TITLE       = 'Billing Due List Report'
         it_sort           = tt_sort
           i_save          = 'A'
         it_events          = tt_alv_events[]
        TABLES
          t_outtab           = tt_output
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " f_alv_disp
    *&      Form  f_build_fieldcat_SUMMARY
          text
    -->  p1        text
    <--  p2        text
    FORM f_build_fieldcat_summary .
    do_sum    no_out    outputlen
      PERFORM f_fieldcat USING:
      'tt_output'  'FKDAT'      text-c01    ' '       ' '       '10' ,
      'tt_output'  'VKORG'      text-c02    ' '       ' '       '10',
      'tt_output'  'VTWEG'      text-c03    ' '       ' '       '10' ,
      'tt_output'  'SPART'      text-c04    ' '       ' '       '10'  ,
      'tt_output'  'KUNAG'      text-c05    ' '       ' '       '10' ,
      'tt_output'  'NAME1'      text-c06    ' '       ' '       '10' ,
      'tt_output'  'AUART'      text-c07    ' '       ' '       '10' ,
      'tt_output'  'BSTNK'      text-c08    ' '       ' '       '10'  ,
      'tt_output'  'AUBEL'      text-c09    ' '       ' '       '10' ,
      'tt_output'  'VGBEL'      text-c10    ' '       ' '       '10' ,
      'tt_output'  'TOTAL'      text-c11    ' '       ' '       '15' .
    ENDFORM.                    "
    *&      Form  f_fieldcat
    FORM f_fieldcat  USING pv_a TYPE any
                           pv_b TYPE any
                           pv_c TYPE any
                           pv_d TYPE any
                           pv_e TYPE any
                           pv_f TYPE any.
      tt_alv_fieldcat-tabname      = pv_a.
      tt_alv_fieldcat-fieldname    = pv_b.
      tt_alv_fieldcat-reptext_ddic = pv_c.
      tt_alv_fieldcat-do_sum       = pv_d.
      tt_alv_fieldcat-no_out       = pv_e.
      tt_alv_fieldcat-outputlen    = pv_f.
      APPEND tt_alv_fieldcat.
      CLEAR tt_alv_fieldcat.
    ENDFORM.                    " f_fieldcat

  • Format issue in opening an XLS attachment sent through email by ABAP2XLSX

    I have downloaded the ABAP2XLSX nuggets and tried to send an attachment in the email using the SAP. But when opening the attachment it is giving up an format issue and not able to view the content. I am able to save the XLSX file on the PC and able to read it but when I  send it to email it doesn't open correctly and it is in a non readable format. Please find the code that I have been using. Can someone help me on this.
    TYPES: BEGIN OF tp_zzrule,
             zzprog     TYPE zzfunc,
             zzdata     TYPE zzcri1,
             zzseq      TYPE zzseq,
             zzkey1     TYPE zzkey1,
             zzkey2     TYPE zzkey2,
         END OF tp_zzrule.
    DATA: w_zzrule   TYPE tp_zzrule,
          t_zzrule   TYPE TABLE OF zzourule.
    TYPE-POOLS: abap.
    DATA:   v_document            TYPE REF TO cl_document_bcs,
            v_recipient           TYPE REF TO if_recipient_bcs,
            v_main_text           TYPE bcsy_text,
            v_send_request        TYPE REF TO cl_bcs,
            v_msub                TYPE so_obj_des,
             v_size               TYPE so_obj_len,
            v_string2             TYPE string,
            v_attsub              TYPE sood-objdes,
            v_mailid              TYPE ad_smtpadr,
            v_sent(1)             type c,
            v_sent_to_all         TYPE os_boolean,
            v_string              TYPE string,
            v_repid               TYPE sy-repid,
            v_title               TYPE so_text255,
            v_dochead             TYPE so_text255.
    DATA lt_test TYPE TABLE OF sflight.
    DATA: lo_excel                TYPE REF TO zcl_excel,
          lo_excel_writer         TYPE REF TO zif_excel_writer,
          lo_worksheet            TYPE REF TO zcl_excel_worksheet,
          column_dimension        TYPE REF TO zcl_excel_worksheet_columndime.
    DATA: ls_table_settings       TYPE zexcel_s_table_settings.
    DATA: lv_file                 TYPE xstring,
          lv_bytecount            TYPE i,
          lt_file_tab             TYPE solix_tab,
          t_objtxt  like solisti1   occurs 0 with header line,
          t_objbin  like solisti1   occurs 0 with header line,
          t_objpack like sopcklsti1 occurs 0 with header line,
          t_reclist like table of somlreci1 with header line.
    DATA: lv_full_path      TYPE string,
          lv_workdir        TYPE string,
          lv_file_separator TYPE c.
    CONSTANTS: lv_default_file_name TYPE string VALUE 'multi sheet test.xlsx'.
    PARAMETERS: p_path  TYPE zexcel_export_dir,
                p_empty TYPE flag.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path.
      lv_workdir = p_path.
      cl_gui_frontend_services=>directory_browse( EXPORTING initial_folder  = lv_workdir
                                                  CHANGING  selected_folder = lv_workdir ).
      p_path = lv_workdir.
    INITIALIZATION.
      cl_gui_frontend_services=>get_sapgui_workdir( CHANGING sapworkdir = lv_workdir ).
      cl_gui_cfw=>flush( ).
      p_path = lv_workdir.
    START-OF-SELECTION.
      IF p_path IS INITIAL.
        p_path = lv_workdir.
      ENDIF.
      cl_gui_frontend_services=>get_file_separator( CHANGING file_separator = lv_file_separator ).
      CONCATENATE p_path lv_file_separator lv_default_file_name INTO lv_full_path.
    SELECT *
        INTO TABLE t_zzrule
       FROM zzourule
      WHERE zzprog  = 'RV63A999'.
        SELECT * FROM sflight INTO TABLE lt_test.
      " Creates active sheet
      CREATE OBJECT lo_excel.
    For first Sheet in the excel workbook
      " Get active sheet
      lo_worksheet = lo_excel->get_active_worksheet( ).
      lo_worksheet->set_title( ip_title = 'Test sheet one').
      ls_table_settings-table_style  = zcl_excel_table=>builtinstyle_medium2.
      ls_table_settings-show_row_stripes = abap_true.
      lo_worksheet->bind_table( ip_table          = lt_test
                                is_table_settings = ls_table_settings ).
      lo_worksheet->freeze_panes( ip_num_rows = 3 ). "freeze column headers when scrolling
      column_dimension = lo_worksheet->get_column_dimension( ip_column = 'E' ). "make date field a bit wider
      column_dimension->set_width( ip_width = 20 ).
    For second Sheet in the excel workbook
      lo_worksheet = lo_excel->add_new_worksheet( ).
      lo_worksheet->set_title( ip_title = 'Second sheet' ).
      lo_worksheet->set_cell( ip_column = 'B' ip_row = 2
               ip_value = 'This is the test for second sheet by Pavan' ).
      ls_table_settings-table_style  = zcl_excel_table=>builtinstyle_medium2.
      ls_table_settings-show_row_stripes = abap_true.
      lo_worksheet->bind_table( ip_table          = t_zzrule
                                is_table_settings = ls_table_settings ).
    This will create excel.
    CREATE OBJECT lo_excel_writer TYPE zcl_excel_writer_2007.
      lv_file = lo_excel_writer->write_file( lo_excel ).
    " Convert to binary
      CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          buffer        = lv_file
        IMPORTING
          output_length = lv_bytecount
        TABLES
          binary_tab    = lt_file_tab.
    Save the file on to the PC
      cl_gui_frontend_services=>gui_download( EXPORTING bin_filesize = lv_bytecount
                                                        filename     = lv_full_path
                                                        filetype     = 'BIN'
                                               CHANGING data_tab     = lt_file_tab ).
    *--Create and set document with attachment.
    v_main_text-line  = 'This is the main text not sure where this would print'.
    append v_main_text.
      TRY.
        v_send_request = cl_bcs=>create_persistent( ).      "#EC .., bzw.
        CATCH cx_send_req_bcs . "#EC NO_HANDLER
      ENDTRY.
      v_msub       = 'Test excel with multi sheets.XLS'.
      TRY.
          v_document = cl_document_bcs=>create_document(
          i_type     = 'RAW'
          i_text     = v_main_text
          i_subject  = v_msub ).
        CATCH cx_document_bcs . "#EC NO_HANDLER
      ENDTRY.
        v_size = lv_bytecount.
    *--Add the attachment.
      TRY.
          v_document->add_attachment(                          "#EC .., bzw
                i_attachment_type    = 'EXT'
               i_attachment_type    = 'XLS'
               i_attachment_type    = 'RAW'
                i_attachment_subject = v_attsub
                i_attachment_size    = v_size
               i_att_content_hex    = lt_file_tab ).    "#EC .., bzw.
               i_att_content_hex    = lt_file_tab ).    "#EC .., bzw.
        CATCH cx_document_bcs . "#EC NO_HANDLER
      ENDTRY.
    *--Add document object to send request.
      TRY.
          v_send_request->set_document( v_document ).         "#EC .., bzw.
        CATCH cx_send_req_bcs . "#EC NO_HANDLER
      ENDTRY.
    *--E-mail recipent list
      t_reclist-rec_type = 'U'.
      t_reclist-receiver = <email Id here>.
      APPEND t_reclist.
      CLEAR t_reclist.
      LOOP AT t_reclist.
        CLEAR v_mailid.
        v_mailid = t_reclist-receiver.
    *--Create mail recipient object.
        TRY.
          v_recipient = cl_cam_address_bcs=>create_internet_address( v_mailid ). "#EC .., bzw.
           CATCH cx_address_bcs . "#EC NO_HANDLER
          ENDTRY.
    *--Add recipient object to send request.
        TRY.
            v_send_request->add_recipient( v_recipient ).     "#EC .., bzw.
          CATCH cx_send_req_bcs . "#EC NO_HANDLER
        ENDTRY.
      ENDLOOP.
    **--Add recipient object to send request.
      TRY.
        v_sent_to_all = v_send_request->send( i_with_error_screen = 'X' ).
    CATCH cx_send_req_bcs . "#EC NO_HANDLER
      ENDTRY.
    *--Send document.
      COMMIT WORK.
      IF sy-subrc = 0.
       MESSAGE s999(zou01) WITH text-020.
        v_sent = 'X'.
      ENDIF.

    I realize this is an old post, but am wondering if you ever resolved this.  I'm having the same issue.  Download an xlsx file locally opens fine, but attaching the seemingly exact same file throw errors/warnings when trying to open via an email attachment.

  • GUI_DOWNLOAD with WK1 File format

    Hi All,
    I am using GUI_DOWNLOAD to download into xls file with "WK1" format.
    My Internal table that is passed to FM has 155 columns.But in the output file i can see only 99 columns. Is there ia restriction to download the number of columns in xls file when the file format used is "WK1".
    Is there any other way to get all columns with "WK1" filetype.
    Thanks.

    Hi,
    try like this.....
    CALL FUNCTION 'GUI_DOWNLOAD'
          EXPORTING
            bin_filesize              = w_bin_filesize
            filename                  = w_full_path
            filetype                  = 'BIN'
            append                    = ' '
            write_field_separator     = ' '
            header                    = '00'
            trunc_trailing_blanks     = ' '
            write_lf                  = 'X'
            col_select                = ' '
            col_select_mask           = ' '
            dat_mode                  = ' '
            confirm_overwrite         = ' '
            no_auth_check             = ' '
            codepage                  = ' '
            ignore_cerr               = abap_true
            replacement               = '#'
            write_bom                 = ' '
            trunc_trailing_blanks_eol = 'X'
            wk1_n_format              = ' '
            wk1_n_size                = ' '
            wk1_t_format              = ' '
            wk1_t_size                = ' '
    *      IMPORTING
    *        filelength                =
            TABLES
            data_tab                  = t_pdf_tab
    *        fieldnames                =
            EXCEPTIONS
            file_write_error          = 1
            no_batch                  = 2
            gui_refuse_filetransfer   = 3
            invalid_type              = 4
            no_authority              = 5
            unknown_error             = 6
            header_not_allowed        = 7
            separator_not_allowed     = 8
            filesize_not_allowed      = 9
            header_too_long           = 10
            dp_error_create           = 11
            dp_error_send             = 12
            dp_error_write            = 13
            unknown_dp_error          = 14
            access_denied             = 15
            dp_out_of_memory          = 16
            disk_full                 = 17
            dp_timeout                = 18
            file_not_found            = 19
            dataprovider_exception    = 20
            control_flush_error       = 21
            OTHERS                    = 22.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
          WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    Arunima

  • FCP and Motion formatting issues with DVCPro 50?

    The material is DVCPro 50 NTSC 48khtz. (Item properties indicate that I initially digitized it properly.) My sequence settings are DV50 NTSC 48khtz.
    I wanted to create a vignette effect so I exported my clips as a Quicktime (current settings) sequence to Motion. When I was done there I exported the sequence from Motion back to FCP as a DV NTSC movie.
    Some of the Motion effected clips will play, look great and then all the sudden I see a black band appear on the East side of the frame. I can stretch it in Motion some but it just degrades the image so I'd rather not.
    I'm surely grateful if someone can steer me in the right direction here.

    Thanks for the workflow tips and suggestions. I backtracked to my original sequence and found the problem originates there. I have narrow black lines on both sides of all these clips. Since I resized a few clips with moves, I didn't recognize the problem. Now that I'm closer the root of it, any suggestions?
    By the way, these problematic clips are intercut with no problem library footage that was also shot on DVCPro 50 and I took in on the same deck.
    I cruised the forum for any occurence of a similiar issue and most replies seem to suggest a formatting issue. I don't get it since I think I have everything set up correctly. As a precaution, I also tossed out my preferences using FCP Rescue 5.
    Welcome to the discussions, splotch.
    Not sure what is causing this, but I might propose an
    alternate workflow. Have your clips on the timeline
    as you wish, ctrl/right click on them and select
    Send To Motion.... Click the
    embedded and open Motion ticks, give it a name, then
    continue. Do your work in Motion, save, quit, and
    fall back into FCP. Your clips may lose their
    "anamorphicness" on their round trip, but just
    ctrl/right click on the clip and select Item Properties/Format..., then
    click on the anamorphic button.
    Try this and see if you are still getting the same
    problem...
    Patrick

  • CSV to Excel 2013 - Issue with number format

    Hi,
    I use Excel 2013 to manipulate CSV files. I experienced issue with number format cells. In my CSV file there is one column that presents latitude values in format: 52.05456464. When I open my CSV file in Excel 2013 all values in that column get separator
    ".", in this case my number is present like this: 52.054.454.464. I tried to change my cell format, and when opened the category was Number, I change it to the General but in that case I lost all "." and got 52054454464.
    I also tried to open same file on other machine with Excel 2010 and file is opened correctly without issues and in cell format the category is general by default.
    I hope that there is some kind of resolution for this.

    Hi
    According to your description, we may follow these steps:
    highlight the column B > Home Tab > Number section > Select Number and choose "More Number Format" > Make sure the Negative number is chosen correctly. If you are using Custom format, we will have to change it.
    Hope it helps
    Best regards

  • Uk date format issue with ASP and Access Database

    I have an Asp form which updates records in an Access
    database. Problem is
    that the date format in the database record is dd/mm/yyyy
    (UK), when
    the record is displayed on the form it is mm/dd/yyyy(US)
    which after I
    update the record in the database the date has changed to the
    new format.
    I have tried everything I can to change the format but to no
    avail...anyone any ideas how I can resolve this issue?
    Thanks
    Steve

    stevo.s wrote:
    > Hi
    >
    > I have tried changing the format on the date field on
    the server behaviours
    > panelto ddmmyyy. Also have tried to set the form field
    format to ddmmyy. I have
    > also tried to use a function I got from a posting
    somehwere on the net to no
    > avail. <%function ddmmyyyy(varDate)
    > ddmmyyyy = Day(DateValue(varDate)) & "/" &
    Month(DateValue(varDate))
    > & "/" & Year(DateValue(varDate))
    > end function
    >
    > I believe that this is a recognised issue with
    Dreamweaver and Access but
    > can't seem to grasp the work around! Problem being I am
    teaching myself through
    > books and internet articles and can be weeks at a time
    without being able to
    > look at the issue..each time I come back to it it is
    like starting all over
    > again! I was hoping that somewhere out there there is a
    simple solution the
    > issue perhaps a date picker with the built in
    functionality to address the
    > issue...I am keen to understand how to deal with the
    issue rather than just
    > change my database date field to fudge the problem as I
    am in the UK and when I
    > eventually start to use the application I would like
    there to be some
    > consistency with dates and that users are familiar with
    the format.
    >
    > Any help gratefully received!
    Its not Dreamweaver, or Access, its your servers locale, its
    set to US
    format, not the UK.
    On your page at the top use:
    <% Session.LCID = 2057 %>
    This will force the page into using UK formatted dates. Use
    it on any
    page that needs to format the page correctly.
    Dooza
    Posting Guidelines
    http://www.adobe.com/support/forums/guidelines.html
    How To Ask Smart Questions
    http://www.catb.org/esr/faqs/smart-questions.html

  • Issue with Date Format

    Hi All,
    I m facing an issue with Date format in the prompt. I have used date presentation variables in my column formula as shown below:
    FILTER("SKU Order Details"."Fulfilled Quantity" USING Time."Calendar Date" <= DATE '@{todate}{2900-01-01}')
    The report returns data when I don't select any date range for start & end date prompts on the page. But when I select the start & end date values in the prompt, I m getting the following error:
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46047] Datetime value 10/22/2009 12:00:00 AM from 10/22/2009 12:00:00 AM does not match the specified format. (HY000)
    I included the following formulas for start & end date prompts:
    Start Date prompt: case when 1=2 then License."Ips Creation Date" else cast ('1.1.1900' as date) end
    End Date prompt: case when 1=2 then License."Ips Creation Date" else cast ('1.1.2900' as date) end
    Can you please help me resolve the issue.
    Thanks,
    Kartik

    Hi Nico,
    I tried putting the format that you mentioned, I m getting an error message.
    My prompts have the following formula :
    Start: case when 1=2 then License."Creation Date" else cast('1.1.1900' as DATE) end
    End: case when 1=2 then Time."Calendar Date" else cast('1.1.2900' as DATE) end
    My column formula has the following syntax:
    FILTER("SKU Order Details"."Fulfilled Quantity" USING Time."Calendar Date" between DATE '@{start}{1900-01-01}' AND DATE '@{end}{2999-01-01}')
    Error Message:
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46047] Datetime value 11/17/2009 from 11/17/2009 does not match the specified format. (HY000)
    Can you please let me know if something needs to be changed.
    Thanks,
    Kartik

  • Issue with Date Format for Presentation Variables

    Hi,
    I am using dashboard prompts to capture begin date and end date in presentation variables. The dates selected from calendar are in the format mm/dd/yyyy.
    In Asnwers I need to get a count of days between begin and end dates. I am using the column formula as shown:
    TIMESTAMPDIFF(SQL_TSI_DAY, DATE '@{pBeginDate}', DATE '@{pEndDate}')
    When ever I run the report from dashboard I get the following error:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46046] Datetime value 1/1/2005 does not match the specified format. (HY000)
    SQL Issued: {call NQSGetQueryColumnInfo('SELECT "Transaction Dates"."Transaction Date", TIMESTAMPDIFF(SQL_TSI_DAY, DATE ''1/1/2005'', DATE ''1/2/2006'' FROM "Dates"')}
    SQL Issued: SELECT "Transaction Dates"."Transaction Date", TIMESTAMPDIFF(SQL_TSI_DAY, DATE '1/1/2005', DATE '1/2/2006') FROM "Dates"
    Can anyone help me to reolve this date format issue?
    Thanks,
    Aravind

    Hi,
    see this below links
    Issues with Prompts calender date
    Regards
    Naresh

  • Downloading of file with default xls format

    Hi All..
    i wish to download all the files with xls as a format irrespective of user selecting either f4 or search help or writing a free text  in the selection screen text box.
    do we have FM or suggest somthing.thanks!
    Moderator message: please (re)search yourself before asking.
    Edited by: Thomas Zloch on Jul 13, 2010 11:53 AM

    Hello Wirtschaftsmann,
    you Need to select the check box " Output to file System". When you select this, the file will be save at the path with the way you want. But then, it will always be saved with the same same and will get overwritten when the next file is created.
    When you fo not select this Checkbox, the file gets saved in Temse Directory and the System automatically puts a number at the end and this Counter gets incremented every time, so that the old file do not get overwrittenn.(As far as i remeber this Counter is till 9999).
    In order to make the file saved the way you want and also do not want it to be overwritten, you Need to write your own logic (e.f. adding timestamp). for this, get in touch with your developer.
    BR
    Amitash

  • Issue with character formats using duplex printing in smartform

    Hi all,
    I am getting a problem with character formats using duplex printing in smartform. I am using a text module with a bold character to display text in a window. The problem is that on the first back page,the text is being printed normally (without bold), but on the next pages, the back pages are being printed with the bold character format.
    Can anyone know where is the problem..please.
    Points to be rewarded..
    Thanks.
    Regards,
    Zaheed.

    Hi Zaheed,
    Normally this should not happen.. and also there is no internal formatting done by SAP.. it will show based on what fomatting option we have specified..
    If you are saying it is happening in ur case then
         1. Recheck whether whether you have same text module getting printed on the
             two page. If they are different then then individual check formatting option for
             each..
          2. If above point does'nt work for you ..then instead of bold char use normal
              format for text element and see if it is printing same on both page..
    Try this out and let us know your findings...
    Enjoy SAP.
    Pankaj Singh

  • Need to avoid header When using GUI_DOWNLOAD with file type "DBF"

    Hi ,
    I am downloading internal table to excel on the desktop using GUI_DOWNLOAD with file type "DBF".
    Internal table I use do not have any header.
    But I do see the header in the downloaded file.
    It displays 1 row as " F1  F2 F3..ETC" heading for each column.
    Is there any variable we need to set to suppress header.
    Thank you,
    Kumar

    Hello Dilip,
    I tried using GUI_DOWNLOAD with FILE TYPE as "DBF", and i see the problem as mentioned. My question to you is:
    1. Why do you need 'DBF' format?
    2. Is it required to save the file as '.CSV'? Can you not try to save in '.XLS' file?
    Plz revert back.
    BR,
    Suhas

  • GUI_DOWNLOAD in Excel format

    Hi Gurus,
    I am using GUI_DOWNLOAD for excel (.XLS) format
    I Used
    *FILETYPE                        = 'ASC'   / DAT
    WRITE_FIELD_SEPARATOR           = 'X'
    My problem is the data not getting  proper excel format.
    thanking you.
    Subash

    You can create a file with extension .xls,
    but in fact the file contains only plain text, but when you open a file by using ms.excel,  it will be generated so that it becomes a table.

  • GUI_DOWNLOAD with filed heading

    Hi Guys,
    I have developed a report, which is having selection option to the user to down load the report output in .XLS format
    I am display the report in ALV grid format, now user requesting me to the headingu2019s of the each filed, while downloading the report through the selection screen input path.
    My report output having 8 fields, do we have any option; where we need to insert the field description while downloading my report?
    Thanks,
    Gourisankar.

    Hi,
    You can append your header for the required columns in
    one internal table and pass it in the Download function module.
    Kindly check the sample code below doing similar functionality,
    *Function module to select path for downloading file
    Call function 'KD_GET_FILENAME_ON_F4'
    Exporting
    program_name         = syst-repid
    dynpro_number        = syst-dynnr
    *       FIELD_NAME          = ' '
    *       STATIC               = ' '
    *       MASK                 = ' '
    Changing
    file_name                   = v_path
    Exceptions
    mask_too_long         = 1
    Others                         = 2
    If sy-subrc <> 0.
    Message id sy-msgid type sy-msgty number sy-msgno
    With sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    *Assigning path value to another var to be passed in gui_download function module
    v_pathname = v_path.
    *If user gives the value in path var then only download will be called
    If v_pathname is not initial.
    *To concatenate extension with file path name
    Concatenate v_pathname '.xls' into v_pathname.
    *FM to download header and contents to the given path
    Call function 'GUI_DOWNLOAD'
    Exporting
    write_field_separator = 'X'
    Filename              = v_pathname 
    Tables
    data_tab              = t_head.
    Refresh t_head.
    Clear t_head.
    Call function 'GUI_DOWNLOAD'
    Exporting
    *   BIN_FILESIZE                                   =
        Filename                                           = v_pathname
        filetype                                              = 'ASC'
        Append                                              = 'X'            u201Cfor appending Heading in the internal table to be downloaded
        write_field_separator                     = 'X'
    *   HEADER                                            = '00'
    *   TRUNC_TRAILING_BLANKS           = 'X'
    *   WRITE_LF                                         = 'X'
    *   COL_SELECT                                     = ' '
    *   COL_SELECT_MASK                        = ' '
    *   DAT_MODE                                      = ' '
    *   CONFIRM_OVERWRITE                  = ' '
    *   NO_AUTH_CHECK                           = ' '
    *   CODEPAGE                                       = ' '
    *   IGNORE_CERR                                 = ABAP_TRUE
    *   REPLACEMENT                                = '#'
    *   WRITE_BOM                                    = ' '
    *   TRUNC_TRAILING_BLANKS_EOL  = 'X'
       WK1_N_FORMAT                              = '22'
       WK1_N_SIZE                                      = '18'
    *   WK1_T_FORMAT                            = ' '
    *   WK1_T_SIZE                                     = ' '
    * IMPORTING
    *   FILELENGTH                                      =
        Tables
        data_tab                                            = it_final      "final internal table having data to be downloaded with header
    *   FIELDNAMES                                   =
      Exceptions
    file_write_error                                    = 1
    no_batch                                               = 2
    gui_refuse_filetransfer                       = 3
    invalid_type                                          = 4
    no_authority                                        = 5
    unknown_error                                   = 6
    header_not_allowed                          = 7
    separator_not_allowed                     = 8
    filesize_not_allowed                          = 9
    header_too_long                                = 10
    dp_error_create                                 = 11
    dp_error_send                                    = 12
    dp_error_write                                  = 13
    unknown_dp_error                           = 14
    access_denied                                   = 15
    dp_out_of_memory                         = 16
    disk_full                                              = 17
    dp_timeout                                    = 18
    file_not_found                              = 19
    dataprovider_exception              = 20
    control_flush_error                      = 21
    Others                                             = 22
    If sy-subrc <> 0.
    Message id sy-msgid type sy-msgty number sy-msgno
    With sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    endif.
    endif.
    endif.
    CLEAR: v_pathname, v_path.
    Hope it helps
    Regards
    Mansi

  • Reports exported to Excel - Formatting issues

    We have two Business Objects Enterprise servers (boxi r2 and boxi r3.1 sp3) running side by side.  We find that reports created using boxi r2 and exported to Excel format look fine.  When we run the same report and export to excel using boxi r3.1 sp3, we encounter the following formatting issues:
    <ol>
    <li>All columns do not fit on pages.  The last 2 to 3 columns spill over onto extra pages.</li>
    <li>There are some columns where most of the values are blank, but when a row is exported that has a value in that column, all subsequent column positions for that row shift.</li>
    <li>All rows do not fit on page.  The last two rows flow onto a new page, then there seems to be a page break.</li>
    <li>On some reports dates are displayed as ######.</li>
    <li>On some reports column headings are  not centered.</li>
    <li>I would appreciate any input that would help us determine a fix for the formatting issues we are encountering.</li>
    </ol>
    The report is executed using CrystalDecisions.CrystalReports.Engine.
    Here is the code from the application that does the export:
                                ExportOptions exportOptions = new ExportOptions();
                                exportOptions.ExportFormatType = ExportFormatType.Excel;
                                exportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
                                DiskFileDestinationOptions diskOptions = new DiskFileDestinationOptions();
                                diskOptions.DiskFileName = filename + ".xls";;
                                exportOptions.ExportDestinationOptions = diskOptions;
                                ExcelFormatOptions XLOptions = new ExcelFormatOptions();
                                XLOptions.ExportPageBreaksForEachPage = true;
                                XLOptions.ExportPageHeadersAndFooters = ExportPageAreaKind.OnEachPage;                           
                                exportOptions.ExportFormatOptions = XLOptions;
                                rptDoc.Export(exportOptions);
    Please note the following details about our environment:
    <h5>Report Designers:</h5>CR Designer version:  xi Rel 2
    <h5>Developer environment</h5>Has the following installed:
    - Business Objects Enterprise XI Release 2
    - VS .Net  2008
    - Crystal reports Basic for Visual Studio 2008
    - Crystal Report 2008 Runtime SP3
    - Boxi .Net SDK
    - SAP BusinessObjects Enterprise XI 3.1 Client Tools sp3
    - .Net Version:  2.0
    <h5>Crystal Server environment:</h5>Two clustered  Business Objects Enterprise servers with the following installed & configured
    - Business Objects Enterprise XI Release 2
    - Crystal Reports XI Release 2
    - SAP BusinessObjects Enterprise XI 3.1 SP3
    - .Net Version:  2.0
    <h5>Web Servers:</h5>Two load balanced web servers with the following installed and configured
    - Business Objects Enterprise XI Release 2
    - Crystal Report 2008 Runtime SP3
    - Crystal Reports XI Release 2 .Net 2005 Server
    - SAP BusinessObjects Enterprise XI 3.1 SP3
    - .Net Version:  2.0

    Umm, the code you provided has nothing to do with Business Objects Enterprise...(?). So, I'm a bit confused by the mention of BOE and "The report is executed using CrystalDecisions.CrystalReports.Engine" in essentially one paragraph.
    Can you pls explain?
    - Ludek

Maybe you are looking for

  • Problem closing an ActiveX created with the bridge and used in a scada.

    Hi all, I cretaed an ActiveX (using the bridge) to be used in a scada software. I inserted the activex in a panel and it opens and work properly when the panel is open. The problem is that when I close the panel, the scada doesnt free the memory. Is

  • How to create User in the specific group in Microsoft Active Directory

    Hi, I am using Nestcape LDAP, and want to create user in the user defined group. I have created a new user group "TestUsers" in the "Users" container of Active Directory, I want to add the new user to Test Users group But my problem is that whenever

  • Itunes does not see my cd drive

    My iTunes installation used to show my CD drive in the left column when I inserted an audion cd into my drive.  Now, suddenly, it does not.  I can force iTunes to play the audio file on the cd but when it finishes playing a tune, the next tune up alw

  • How Can you dynamically change a canvas frame title?

    I am looking for a way to dynamically change the title of a frame on a canvas.

  • What would happen if this runs?

    This is a 'real' code example that i found in this program. Could this cause connection pools to not be relased Connection con = null; stmt = con.createStatement(); int ret = stmt.executeUpdate(simple query); con.commit(); con.rollback(); con.commit(