Column format spool to excel

I'm spooling a file to Excel and all is working except for the ID field. It is a 10 character field of numbers that loses the leading zeroes. So 0000138750 appears in Excel as 138750. Is there a column format that I can use that will translate correctly?

Hi,
You aren't really spooling to Excel, you are probably spooling a comma sepearated (.csv) file. When that is opened, Excel recognized that the data are really numbers and displays as number, i.e., without leading zereos.
So, this is really an Excel issue, and I don't think you can do much about it, except from applying format in Excel.. Not so long ago, I tried foolling around with quotes and stuff. At the time, no luck, but maybe you'll do better.
Regards
Peter

Similar Messages

  • Report output format xml, missing column while open in excel for single row

    Dear,
    There is a strange case, we have an customize concurrent program to display output in xml format. Now Problem is, if query get single record on the bases of parameter then there is no column heading available in excel. However, if parameter meet more than one record then there is no issue with column heading and reports is working find.
    Pls have an idea?

    Dear Pk,
    Here is an example, will show the actual problem. Let explain you, first i have run report by restricting query on single record which output name is "output1", again i run same report by changing where clause so it return multiple row which is "output2". if you past code in text document each one and save it as xml but when you open this file in excel report you will find column heading which rows consist multiple row, however, ouput1 file have no heading columns that's a problem.
    1.Oputput1
    <?xml version="1.0"?>
    <!-- Generated by Oracle Reports version 6.0.8.11.3 -->
    <DEPTNO>
    <LIST_G_EMPNO>
    <G_EMPNO>
    <EMPNO>7839</EMPNO>
    <ENAME>KING</ENAME>
    <HIREDATE>17-NOV-81</HIREDATE>
    <SAL>5000</SAL>
    <DEPTNO>10</DEPTNO>
    </G_EMPNO>
    </LIST_G_EMPNO>
    </DEPTNO>
    2.Oputput2
    <?xml version="1.0"?>
    <!-- Generated by Oracle Reports version 6.0.8.11.3 -->
    <T01103240>
    <LIST_G_EMPNO>
    <G_EMPNO>
    <EMPNO>7788</EMPNO>
    <ENAME>SCOTT</ENAME>
    <HIREDATE>09-DEC-82</HIREDATE>
    <SAL>3000</SAL>
    <DEPTNO>20</DEPTNO>
    </G_EMPNO>
    <G_EMPNO>
    <EMPNO>7902</EMPNO>
    <ENAME>FORD</ENAME>
    <HIREDATE>03-DEC-81</HIREDATE>
    <SAL>3000</SAL>
    <DEPTNO>20</DEPTNO>
    </G_EMPNO>
    </LIST_G_EMPNO>
    </T01103240>
    Hope you got it.

  • How do I maintain column formatting when converting from PDF to Excel?

    How do I maintain column formatting when converting from PDF to Excel? All info is no longer on the lines or in the columns they started out being in? Any help would be appreciated.

    Sara,
    Perhaps I am expecting too much from Adobe ExportPDF. The reason I subscribed to this service, for which I pay a yearly fee, was that I need a way to  convert scanned and digital documents to Word &/or Excel. I read the link you included but to be candid the more I tried to understand what was written the more confused I got. The process should not be this difficult. Currently I am using a NEAT scanner to create PDF documents of whatever I scan. After I changed the OCR setting on Adobe ExportPDF the output was much better but not to the point it was usable as it was. Information that appears to be lines and columns are sometimes not recognizing two columns and just putting them together in one. Obviously not usable. The other thing it does is bunch numbers that appear in a column that are just a bunch of numbers that I have no way of fixing. 
    Please let me speak to someone who can help me. Right now I not getting anything of value in my paid subscription.

  • Send/export the background job spool in Excel (in MHTML format) in ECC 6.0.

    Hello All,
    I have a requirement to send/export the background job spool in Excel (in MHTML format) in ECC 6.0. Please help.
    Thank you.
    Nalini

    Hi Jigar,
    Thanks for your response.
    Anything is like download to desktop or email is fine. But in MHTML format.
    We can download the ALV report in MHTML spreadsheet format when we run the program online. But the program is running for long time and going to dump.
    So i scheduled it as background job and downloading the output in  .HTML format. But user wants the spool/report output in .MHTML spreadsheet format.
    I can write the code. Instead of changing the existing program I would like to know is there any way (from standard SAP) that I can get the background spool in MHTML spreadsheet format.
    Thanks,
    Nalini

  • How To Set Excel Column Format Latebinding

    private void WriteToExcel(ref System.Data.DataTable dtExcel)
    //Microsoft.Office.Interop.Excel.Application oXL = null;
    //Microsoft.Office.Interop.Excel._Workbook oWB;s
    //Microsoft.Office.Interop.Excel._Worksheet oSheet;
    //SaveFileDialog SFD = new SaveFileDialog();
    //SFD.Filter = "Excel 97-2003 Workbook(*.xls)|*.xls|Excel Workbook(*.xlsx)|*.xlsx|Excel Binary Workbook(*.xlsb)|*.xlsb|" +
    //"Excel Macro-Enabled Workbook(*.xlsm)|*.xlsm";
    //SFD.ShowDialog();
    /*Cell Format Text,
    Format Excel cells to store values as text
    Formating Excel cells to text format will solve the problem of losing leading zeo values when you export data from other data sources to excel.
    Excel.Range formatRange;
    formatRange = xlWorkSheet.get_Range("a1", "b1");
    formatRange.NumberFormat = "@";
    xlWorkSheet.Cells[1, 1] = "098";
    if (dgvData.RowCount == 0)
    MessageBox.Show("GridView is Empty.");
    return;
    tlsStatus.Text = "Export To Excel Strats.... ";
    tlsStatus.ForeColor = System.Drawing.Color.DeepPink;
    prbExcelGen.Value = 0;
    prbExcelGen.Minimum = 0;
    prbExcelGen.Maximum = dgvData.RowCount;
    prbExcelGen.Step = 1;
    prbExcelGen.Refresh();
    object objApp_Late;
    object objBook_Late;
    object objBooks_Late;
    object objSheets_Late;
    object objSheet_Late;
    object objRange_Late;
    object[] Parameters;
    string[] headers = new string[dgvData .ColumnCount];
    string[] columns = new string[dgvData.ColumnCount];
    int i = 0;
    int c = 0;
    for (c = 0; c <= dgvData.ColumnCount - 1; c++)
    headers[c] = dgvData.Rows[0].Cells[c].OwningColumn.Name.ToString();
    //Convert Cell Names To A,B,C...Z , 65+C=CHR(C)=>A WHEN C=0
    i = c + 65;
    columns[c] = Convert.ToString((char)i);
    try
    // Get the class type and instantiate Excel.
    Type objClassType;
    objClassType = Type.GetTypeFromProgID("Excel.Application");
    objApp_Late = Activator.CreateInstance(objClassType);
    //Get the workbooks collection.
    objBooks_Late = objApp_Late.GetType().InvokeMember("Workbooks",BindingFlags.GetProperty, null, objApp_Late, null);
    //Add a new workbook.
    objBook_Late = objBooks_Late.GetType().InvokeMember("Add",BindingFlags.InvokeMethod, null, objBooks_Late, null);
    //Get the worksheets collection.
    objSheets_Late = objBook_Late.GetType().InvokeMember("Worksheets",BindingFlags.GetProperty, null, objBook_Late, null);
    //Get the first worksheet.
    Parameters = new Object[1];
    Parameters[0] = 1;
    objSheet_Late = objSheets_Late.GetType().InvokeMember("Item",
    BindingFlags.GetProperty, null, objSheets_Late, Parameters);
    //if (true)
    // Create the headers in the first row of the sheet
    for (c = 0; c <= dgvData.ColumnCount - 1; c++)
    //Get a range object that contains cell.
    Parameters = new Object[2];
    Parameters[0] = columns[c] + "1";
    Parameters[1] = Missing.Value;
    objRange_Late = objSheet_Late.GetType().InvokeMember("Range",
    BindingFlags.GetProperty, null, objSheet_Late, Parameters);
    //Write Headers in cell.
    Parameters = new Object[1];
    Parameters[0] = headers[c];
    objRange_Late.GetType().InvokeMember("Value", BindingFlags.SetProperty,
    null, objRange_Late, Parameters);
    // Now add the data from the grid to the sheet starting in row 2
    for (i = 0; i < dgvData.RowCount - 1; i++)
    prbExcelGen.PerformStep();
    prbExcelGen.Refresh();
    for (c = 0; c <= dgvData.ColumnCount - 1; c++)
    //Get a range object that contains cell.
    Parameters = new Object[2];
    Parameters[0] = columns[c] + Convert.ToString(i + 2);
    Parameters[1] = Missing.Value;
    objRange_Late = objSheet_Late.GetType().InvokeMember("Range",
    BindingFlags.GetProperty, null, objSheet_Late, Parameters);
    //Write Headers in cell.
    Parameters = new Object[1];
    Parameters[0] = dgvData.Rows[i].Cells[headers[c]].Value.ToString();
    objRange_Late.GetType().InvokeMember("Value", BindingFlags.SetProperty,
    null, objRange_Late, Parameters);
    //if (i == 0)
    // BoldRow(i, c, (EXL._Worksheet)objSheet_Late);
    tlsStatus.Text = "Exporting Records...." + i;
    //Return control of Excel to the user.
    Parameters = new Object[1];
    Parameters[0] = true;
    tlsStatus.Text = "Exporting Completed.";
    objApp_Late.GetType().InvokeMember("Visible", BindingFlags.SetProperty,
    null, objApp_Late, Parameters);
    objApp_Late.GetType().InvokeMember("UserControl", BindingFlags.SetProperty,
    null, objApp_Late, Parameters);
    * oWB.SaveAs(fileName, Excel.XlFileFormat.xlOpenXMLWorkbook,
    missing, missing, missing, missing,
    Excel.XlSaveAsAccessMode.xlNoChange,
    missing, missing, missing, missing, missing);
    //oWB = (Microsoft.Office.Interop.Excel._Workbook)objBook_Late;
    //oWB.SaveAs("file", EXL.XlFileFormat.xlXMLSpreadsheet, Type.Missing, Type.Missing, Type.Missing, Type.Missing, EXL.XlSaveAsAccessMode.xlNoChange, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
    //oWB.Save();
    catch (Exception theException)
    String errorMessage;
    errorMessage = "Error: ";
    errorMessage = String.Concat(errorMessage, theException.Message);
    errorMessage = String.Concat(errorMessage, " Line: ");
    errorMessage = String.Concat(errorMessage, theException.Source);
    MessageBox.Show(errorMessage);
    finally
    using the above code i am writing to excel sheet can some one help me to tell how can i set a column type as text 

    Thanks Forum,
    i got the answer here
    https://social.msdn.microsoft.com/Forums/windows/en-US/36340ada-e13b-41cb-a31d-fb76121aa0d2/c-exporting-text-file-to-excel-and-column-formatting-problem?forum=csharpgeneral

  • EXport Data to Excel with Columns format

    Dear All,
    This may  be a basic question, however, I just need a tip to conclude my issue. 
    I have a Report that displays Financial Budget data (AFE).  I am able to download to the Excel sheet.  However, I need to conclude it with the column formatted at code itself and not given to the user.
    That is I want to set couple of column to Numeric, and Set Colum width defined at Code level itself.
    I am already using the Function module : MS_EXCEL_OLE_STANDARD_DAT
    Regards,
    Venkat

    data: go_excel       type ole2_object,
              Go_CELL        TYPE OLE2_OBJECT,
              go_workbooks   TYPE OLE2_OBJECT,
              go_workbook    TYPE OLE2_OBJECT,
              go_sheet       type OLE2_OBJECT,
              go_application type OLE2_OBJECT,
              go_activesheet type OLE2_OBJECT,
              go_text        type OLE2_OBJECT.
        gv_EXTRD = sy-datum.
        gv_EXTRT = sy-uzeit.
        concatenate pfile gv_EXTRD gv_EXTRT  'check.xls' into gv_file.
        clear: gt_export, gs_export.
    ****INITIATE EXCEL
    Create object Excel
        create object go_excel 'EXCEL.APPLICATION'.
        set property of go_excel 'Visible' = 0.
    Create workbook object
        call method of go_excel 'WORKBOOKS' = go_workbook .
      Add workbook
        call method of go_workbook 'Add' = go_workbook.
        lv_line = 0.
        loop at gt_collect ASSIGNING <collect>.
          lv_line = lv_line + 1.
          move-corresponding <collect> to gs_export.
          clear: gs_export-ZALDT.
          concatenate <collect>-ZALDT4(2) '-' <collect>-ZALDT6(2) '-' <collect>-ZALDT+0(4)
               into gs_export-ZALDT.
    Populate cells
          call method of go_excel 'Cells' = Go_CELL
            EXPORTING
              #1 = lv_line
              #2 = 1.
    **************SET UP PROPERTY WIDTH ****************************
          SET PROPERTY OF GO_CELL 'ColumnWidth' = '11'.
          SET PROPERTY OF GO_CELL 'Value' = gs_export-BANKL.
    ***********SET PROPERTY CELL NUMBER**************************************
          call method of go_excel 'Cells' = Go_CELL
            EXPORTING
              #1 = lv_line
              #2 = 4.
          SET PROPERTY OF go_cell 'NumberFormat' = '@'.     "PROPERTY NUMBER
          SET PROPERTY OF GO_CELL 'ColumnWidth' = '10'.
          SET PROPERTY OF GO_CELL 'Value' = gs_export-ZALDT.
    endloop.
    **CLOSE EXCEL**********
        CALL METHOD OF go_workbook 'SaveAs'
          EXPORTING #1 = gv_file
          #2 = 1.
        "file format
        CALL METHOD OF go_workbook 'close'.                                    "file format
        call method of go_excel 'QUIT'.
    ****OPEN CREATED EXCEL FILE ****************************
        call method of go_excel 'Workbooks' = go_workbooks.
        call method of go_workbooks 'Open'
          EXPORTING
            #1 = gv_file.
        set property of go_excel 'Visible' = 1.

  • OLE2 how to set a column width of an excel file i'm creating?

    how can i set the column width in an excel file i'm creating with ole?
    or even, haw can i set the auto-fix properties?

    Hallo !
    SORRY MY ENGLISH is very BAD.
    I tried to set page header and  footer in Excel sheet with abap ole
    DATA : BEGIN OF enter,
             x(1) TYPE x VALUE '0D',
            END OF enter.
    DATA : format(255) TYPE c.
    FORM set_page_sheet.
      CALL METHOD OF excel 'ActiveSheet' = sheet.
      CALL METHOD OF sheet 'PageSetup' = pagesetup.
      SET PROPERTY OF pagesetup 'Orientation' = xllandscape.
      SET PROPERTY OF pagesetup 'PrintTitleRows' = '$9:$12'.
      CLEAR format.
    ERROR
      CONCATENATE 'PAGESHEET' enter-x 'PAGE &P/&N' INTO format.
    ERROR
      SET PROPERTY OF pagesetup 'RightHeader' = format.
      CLEAR format.
      CONCATENATE ' Text 1 ' enter-x 'Text 2'
    enter-x 'Text 3 ' INTO format.
      SET PROPERTY OF pagesetup 'RightFooter' = format.
      FREE OBJECT pagesetup.
    ENDFORM.                    " set_page_sheet
    Activate report -
    ERROR - The enter-x must by data type c or another then data type x
    Thanks for answer.

  • How to download data from spool to excel file

    Hi,
    I have requirement like....i need to download data from spool to excel file.
    Please let me know the process how to download...
    <removed by moderator>
    <removed by moderator>
    Thanks,
    Khasimsa
    Moderator message: please (re)search yourself before asking, do not assign priorities, do not offer re-ward
    locked by: Thomas Zloch on Sep 8, 2010 1:18 PM

    Hi try this way..
    *FM called that returns the Spool Request Number data into and internal table
      CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
        EXPORTING
          rqident              = p_spool                     "Spool Request Number
          first_line           = 1
        TABLES
          buffer               = it_spool_xls                            "Internal table that will have the Spool Request No data
        EXCEPTIONS
          no_such_job          = 1
          not_abap_list        = 2
          job_contains_no_data = 3
          selection_empty      = 4
          no_permission        = 5
          can_not_access       = 6
          read_error           = 7
          OTHERS               = 8.
    *To convert the spool data into excel format
      CALL FUNCTION 'SO_RAW_TO_RTF'
        TABLES
          objcont_old = it_spool_xls               "Internal table having spool data
          objcont_new = it_xls_spool.           "Int table having Excel format data converted from Spool data
    "call GUI down Load by passing  it_xls_spool
    Prabhudas

  • Send email with spool in excel attachment

    Hi,
    I have this function:
    CALL FUNCTION 'Z_SEND_EMAIL_SPOOL_PDF'
           EXPORTING
                application = 'EMAIL'
                emailtitle  = texttitle
                recextnam   = email
                src_spoolid = tsp01-rqident
           TABLES
                texttab     = body.
    And code:
    FUNCTION z_send_email_spool_pdf .
    *"*"Interfase local
    *"  IMPORTING
    *"     REFERENCE(APPLICATION) LIKE  SOOD1-OBJNAM DEFAULT 'EMAIL'
    *"     REFERENCE(EMAILTITLE) LIKE  SOOD1-OBJDES
    *"     VALUE(RECEXTNAM) LIKE  SOOS1-RECEXTNAM
    *"     REFERENCE(SRC_SPOOLID) LIKE  TSP01-RQIDENT
    *"  TABLES
    *"      TEXTTAB STRUCTURE  SOLI
    *- local data declaration
      DATA: ohd    LIKE sood1,
            oid    LIKE soodk,
            to_all LIKE sonv-flag,
            okey   LIKE swotobjid-objkey.
      DATA: g_document     LIKE sood4,
            g_header_data  LIKE sood2,
            g_authority LIKE sofa-usracc,
            lt_attachments LIKE STANDARD TABLE OF sood5 WITH HEADER LINE,
            l_folder_id    LIKE sofdk,
            l_objcont     LIKE soli OCCURS 0 WITH HEADER LINE,
            i_bin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
            l_objhead     LIKE soli OCCURS 0 WITH HEADER LINE,
            folder_id      LIKE soodk,
            object_id      LIKE soodk,
            link_folder_id LIKE soodk,
            hd_dat  LIKE sood1.
      DATA: desired_type  LIKE sood-objtp,
            real_type LIKE sood-objtp,
            attach_type LIKE sood-objtp,
            otf LIKE sood-objtp VALUE 'OTF', " SAPscript Ausgabeformat
            ali LIKE sood-objtp VALUE 'ALI', " ABAP lists
            pdf LIKE sood-objtp VALUE 'PDF', "PDF format
            pbyte TYPE i,
            t_pdf LIKE tline OCCURS 0 WITH HEADER LINE,
            objtype LIKE rststype-type,
            type    LIKE rststype-type.
      CONSTANTS: ou_fol LIKE sofh-folrg              VALUE 'O',
                 c_objtp    LIKE g_document-objtp    VALUE 'RAW',
                 c_file_ext LIKE g_document-file_ext VALUE 'PDF'.
      DATA: BEGIN OF receivers OCCURS 0.
              INCLUDE STRUCTURE soos1.
      DATA: END OF receivers.
    * Fist part: Verify if the spool really exists
      SELECT SINGLE * FROM tsp01 WHERE rqident = src_spoolid.
      CHECK sy-subrc = 0.
    *- fill odh
      CLEAR ohd.
      ohd-objla    = sy-langu.
      ohd-objnam   = application.
      ohd-objdes   = emailtitle.
      ohd-objpri   = 3.
      ohd-objsns   = 'F'.
      ohd-ownnam   = sy-uname.
    *- send Email
      CONDENSE recextnam NO-GAPS.
      CHECK recextnam <> space AND recextnam CS '@'.
      CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
           EXPORTING
                authority     = 'SP01'
                client        = tsp01-rqclient
                name          = tsp01-rqo1name
                part          = 1
           IMPORTING
                type          = type
                objtype       = objtype
           EXCEPTIONS
                fb_error      = 1
                fb_rsts_other = 2
                no_object     = 3
                no_permission = 4
                OTHERS        = 5.
      attach_type = c_objtp.
      desired_type = pdf.
      IF objtype(3) = 'OTF'.
        CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
             EXPORTING
                  src_spoolid   = src_spoolid
             IMPORTING
                  pdf_bytecount = pbyte
             TABLES
                  pdf           = t_pdf.
      ELSE.
        CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
             EXPORTING
                  src_spoolid   = src_spoolid
             IMPORTING
                  pdf_bytecount = pbyte
             TABLES
                  pdf           = t_pdf.
      ENDIF.
      PERFORM convertir_tabla_pdf_2 TABLES t_pdf l_objcont.
      CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
           EXPORTING
                owner     = sy-uname
                region    = ou_fol
           IMPORTING
                folder_id = l_folder_id
           EXCEPTIONS
                OTHERS    = 5.
    * fill out informations about the header of the email
      CLEAR: g_document.
      g_document-foltp     = l_folder_id-foltp.
      g_document-folyr     = l_folder_id-folyr.
      g_document-folno     = l_folder_id-folno.
      g_document-objtp     = c_objtp.
      g_document-objdes    = emailtitle.
      g_document-file_ext  = c_file_ext.
      g_header_data-objdes    = emailtitle.
      CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'
           EXPORTING
                method      = 'SAVE'
                office_user = sy-uname
           IMPORTING
                authority   = g_authority
           TABLES
                objcont     = texttab
                attachments = lt_attachments
           CHANGING
                document    = g_document
                header_data = g_header_data
           EXCEPTIONS
                OTHERS      = 1.
      object_id-objtp = c_objtp.
      object_id-objyr = g_document-objyr.
      object_id-objno = g_document-objno.
      folder_id-objtp = l_folder_id-foltp.
      folder_id-objyr = l_folder_id-folyr.
      folder_id-objno = l_folder_id-folno.
      link_folder_id-objtp = l_folder_id-foltp.
      link_folder_id-objyr = l_folder_id-folyr.
      link_folder_id-objno = l_folder_id-folno.
      hd_dat-file_ext = pdf.
      hd_dat-objdes = emailtitle.
      CALL FUNCTION 'SO_ATTACHMENT_INSERT'
           EXPORTING
                object_id                  = object_id
                attach_type                = attach_type
                object_hd_change           = hd_dat
                owner                      = sy-uname
           TABLES
                objcont                    = l_objcont
                objhead                    = l_objhead
           EXCEPTIONS
                active_user_not_exist      = 35
                communication_failure      = 71
                object_type_not_exist      = 17
                operation_no_authorization = 21
                owner_not_exist            = 22
                parameter_error            = 23
                substitute_not_active      = 31
                substitute_not_defined     = 32
                system_failure             = 72
                x_error                    = 1000.
    *       FORM SO_OBJECT_SEND_REC                                       *
    FORM  so_object_send_rec
          TABLES  objcont      STRUCTURE soli
                  receivers    STRUCTURE soos1
          USING   object_hd    STRUCTURE sood1
                  folder_id
                  object_id
                  link_folder_id.
      DATA:   oid     LIKE soodk,
              to_all  LIKE sonv-flag,
              okey    LIKE swotobjid-objkey.
      CALL FUNCTION 'SO_OBJECT_SEND'
           EXPORTING
                extern_address             = 'X'
    *            object_hd_change           = object_hd
    *            object_type                = 'RAW'
                outbox_flag                = 'X'
                sender                     = sy-uname
                owner                      = sy-uname
                folder_id                  = folder_id
                object_id                  = object_id
                store_flag                 = 'X'
                link_folder_id             = link_folder_id
           IMPORTING
                object_id_new              = oid
                sent_to_all                = to_all
                office_object_key          = okey
           TABLES
                objcont                    = objcont
                receivers                  = receivers
           EXCEPTIONS
                active_user_not_exist      = 1
                communication_failure      = 2
                component_not_available    = 3
                folder_not_exist           = 4
                folder_no_authorization    = 5
                forwarder_not_exist        = 6
                note_not_exist             = 7
                object_not_exist           = 8
                object_not_sent            = 9
                object_no_authorization    = 10
                object_type_not_exist      = 11
                operation_no_authorization = 12
                owner_not_exist            = 13
                parameter_error            = 14
                substitute_not_active      = 15
                substitute_not_defined     = 16
                system_failure             = 17
                too_much_receivers         = 18
                user_not_exist             = 19
                x_error                    = 20
                OTHERS                     = 21.
      IF sy-subrc <> 0.
        RAISE others.
      ENDIF.
    ENDFORM.
    *       FORM INIT_REC                                                 *
    FORM init_rec TABLES receivers STRUCTURE soos1.
      CLEAR receivers.
      REFRESH receivers.
      MOVE sy-datum  TO receivers-rcdat .
      MOVE sy-uzeit  TO receivers-rctim.
      MOVE '1'       TO receivers-sndpri.
      MOVE 'X'       TO receivers-sndex.
      MOVE 'U-'      TO receivers-recnam.
      MOVE 'U'       TO receivers-recesc.
      MOVE 'INT'     TO receivers-sndart.
      MOVE '5'       TO receivers-sortclass.
      APPEND receivers.
    ENDFORM.
    With this function I can send a spool in pdf format by email. But, now I need send a spool in Excel (xls) format by email. I try to disconnect 'CONVERT_OTFSPOOLJOB_2_PDF' and 'CONVERT_ABAPSPOOLJOB_2_PDF' but doesnt work.
    Can you help me?
    A lot of thanks in advance.
    Best regards.

    Hi.
    I do not think it is feasible to create a worthwhile Excel file from a SAP spool file.
    I have reports that send output as Excel attachments to email, but the code (including function modules etc) is too much to post here.
    You can use OLE to create an Excel file, but this will not generally work when the report is run in the background.
    So my approach is to make the report write an Excel XML file (that's just text after all), and send that as an XLS email attachment.  When the email receiver double-clicks on the attachment, it fires up Excel and brings in the data.  Most users would not realise that it's not a native Excel file.
    One nice touch is to have two sheets in the Excel file, one with the main report and the other with the selection criteria.
    Of course there is a lot of work getting started with this.
    John

  • PDF export for  columns formatted as HTML

    Hello,
    I've created a report having some columns formatted as HTML .
    in the PDF file exported from BI Answers dashboard, HTML tags are shown instead of formatted value.
    (for example : "div style="width:100%;background-color:#FF3300">89.12%</div" instead of 89.92%)
    Any ideas how to fix this ?
    BI version : 10.1.3.3.3
    Thank you.

    Hi dragosv,
    I've also encountered similar problems to that. The OBIEE process does not first evaluate the code before it exports to other tools like PDF and Excel.
    Here are two options:
    1) Submit an SR to Oracle and have them declare it a bug
    2) Print to HTML first, then print the HTML to PDF. It adds a step but at least you can download your document the way you want.
    Best regards,
    -Joe

  • Export of DATE column not recognized by Excel

    SQL DEVELOPER version 2.1.1.64
    just installed.
    When I export a table to Desktop as XLS or CSV, all the DATE columns show this format:
    11-MAY-09 12.00.00.000000000 AM
    MicroSoft Excel will not convert this to standard format: MM/DD/YYYY
    I changed NLS setting in SQL DEVELOPER for Date and TimeStamp, Excel still does not convert.
    Any suggestions?

    (1)
    export from the context menu on the table's navigator tree node
    (2)
    export from worksheet result set
    (3)
    export from table Data tab
    All three exports work.
    Each DATE column in the export file shows the TIMESTAMP value.
    Unfortunately, after the export, when I apply the DATE format inside of Excel using "Format Cells",
    the data in the Excel column does not change to MM/DD/YYYY
    WHY DOES APPLYING FORMAT INSIDE EXCEL FAIL?
    THIS IS MY QUESTION.
    (4)
    copy the result set from SQL*Developer (CTRL-A, then CTRL-C or CTRL-SHIFT-C) and paste in Excel.
    The DATE column shows value in MM/DD/YYYY format and I can change the format.
    This works but not for large amounts of data.

  • I need how to load data from MS Excel(csv format) to NW Excel

    Hi,
    I am doing Migration project from SAP MS to NW Manually.
    I need how to load data from MS excel (csv format) to NW excel .
    For example 2008 budget data.
    Could you please help me in this.
    Thanks and Regards
    Krishna

    Hi,
    You need to create a transformation file and a conversion file if required. First upload the excel (csv) file into BPC using Manage Data and Upload File option.
    Create the transformation file (refer to the sap help  on how to define a transformation file). You need to specify the mapping correctly and include all your application dimensions and map them to appropriate columns of the flat file.
    Before running the import package, do validate the data in the flat file you uploaded into BPC with the transformation file you created.
    Thanks,
    Sreeni

  • Spool to Excel or Text Conversion

    Dear All,
    Is it possible to convert a spool into Excel file or Text Format?

    Hi
    Check the below links. They wil help you in converting spool to text format.
    [http://www.sap-basis-abap.com/sapac016.htm]
    [http://help.sap.com/saphelp_nw70/helpdata/en/30/cc154219fce12ce10000000a1550b0/content.htm]
    Thanks,
    Jyothi

  • Spool to excel

    Hi,
      Can we convert the spool into excel format and send as attachement via mail.I don't want to send spool as PDF.
    Regards,
    Karthik.k

    Karthik,
    Use the function  "RSPO_DOWNLOAD_SPOOLJOB"
    or use   "BAPI_XBP_JOB_SPOOLLIST_READ_20 "
    Message was edited by:
            ANIRUDDHA DAS

  • Spool to Excel or Text Conversion thru ABAP

    Dear All,
    Is it possible to convert a spool into Excel file or Text Format thru ABAP?

    Hi!
    The function modules CONVERT_ABAPSPOOLJOB_2_PDF, CONVERT_OTFSPOOLJOB_2_PDF are converting spool to PDF.
    HTH
    Peter

Maybe you are looking for