Display Export to ms excel in SAP B1 version 9.1

Hi Everyone!
I am learning SAP B1 version 9.1 at advanced G/L account determination.Highlights of SAP version 9.1 display "Export to ms excel" and "Migrate"button but I can not find them.
Everyone that knows these ones, please help me!
Thanks & Best regards
Ngoc Loan

Hi Loan Tran..
I checked in the Indian and US DB could not able to locate the migrate and the export to excel options on the screen i think seams like a bug.  When you right click on the grid you can copy the table and paste on excel option is available..
Regards
Kennedy

Similar Messages

  • Error message when trying to export pdf to excel

    i keep getting an error message when trying to export a pdf to excel

    Hi ,
    Could you please elaborate more about the issue ?What exactly are you trying to perform and how are you trying to do the same?
    Are you using Adobe Reader or Adobe Acrobat to export PDF to excel?
    What software version are you using?
    Also ,could you please tell what is that error message and it would be wonderful if you could share the screenshot of the error message with us so that we can assist you accordingly .
    I would also like to know what OS do you work on ?
    Is it happening with all kinds of PDF you are trying to convert or any specific one?
    Please update me with above mentioned details so that we can assist you further .
    Regards
    Sukrit Dhingra

  • Stored procedure to export result to excel header not displayed

    Hi,
    I am using below stored procedure to export data to excel with header. but it is not displaying the header . i believe this is because the max length of query can be 8000. but  I have more than 250 columns so probably the length of query is breaking
    the code.
    can someone please help here.
    Thanks in advance.
    ALTER procedure [dbo].[proc_generate_excel_with_columns]
    @table_name varchar(100),
    @file_name varchar(100)
    as
    --Generate column names as a recordset
    declare @columns varchar(8000), @sql varchar(8000), @data_file varchar(100)
    select
    @columns=coalesce(@columns+',','')+column_name+' as '+column_name
    from
    information_schema.columns
    where
    table_name=@table_name
    select @columns=''''+replace(replace(@columns,' as ',''' as '),',',',''')
    --Create a dummy file to have actual data
    select @data_file=substring(@file_name,1,len(@file_name)-charindex('\',reverse(@file_name)))+'\data_file.csv'
    --Generate column names in the passed EXCEL file
    set @sql='bcp "select * from (select ' + @columns + ') as header" queryout E:\test.csv -c -t, -T -S ' + @@servername
    exec master..xp_cmdshell @sql
    --Generate data in the dummy file
    set @sql='bcp "select * from CustomerTable where ReservationDate>''1/1/2013''" queryout E:\data_file.csv -c -t, -T -S' + @@servername
    exec master..xp_cmdshell @sql
    --Copy dummy file to passed EXCEL file
    set @sql= 'exec master..xp_cmdshell ''type '+@data_file+' >> "'+@file_name+'"'''
    exec(@sql)
    ----Delete dummy file
    set @sql= 'exec master..xp_cmdshell ''del '+@data_file+''''
    exec(@sql)
    --EXEC proc_generate_excel_with_columns 'CustomerTable','E:\test.csv'

    Can you try to print the @columns?
    In the same procedure can you change size of @columns to varchar(max) and try executing the procedure?
    ALTER procedure [dbo].[proc_generate_excel_with_columns]
    @table_name varchar(100),
    @file_name varchar(100)
    as
    --Generate column names as a recordset
    declare @columns varchar(max), @sql varchar(max), @data_file varchar(100)
    select
    @columns=coalesce(@columns+',','')+column_name+' as '+column_name
    from
    information_schema.columns
    where
    table_name=@table_name
    select @columns=''''+replace(replace(@columns,' as ',''' as '),',',',''')
    print @Columns
    --Create a dummy file to have actual data
    select @data_file=substring(@file_name,1,len(@file_name)-charindex('\',reverse(@file_name)))+'\data_file.csv'
    --Generate column names in the passed EXCEL file
    set @sql='bcp "select * from (select ' + @columns + ') as header" queryout E:\test.csv -c -t, -T -S ' + @@servername
    exec master..xp_cmdshell @sql
    --Generate data in the dummy file
    set @sql='bcp "select * from CustomerTable where ReservationDate>''1/1/2013''" queryout E:\data_file.csv -c -t, -T -S' + @@servername
    exec master..xp_cmdshell @sql
    --Copy dummy file to passed EXCEL file
    set @sql= 'exec master..xp_cmdshell ''type '+@data_file+' >> "'+@file_name+'"'''
    exec(@sql)
    ----Delete dummy file
    set @sql= 'exec master..xp_cmdshell ''del '+@data_file+''''
    exec(@sql)
    --EXEC proc_generate_excel_with_columns 'CustomerTable','E:\test.csv'
    --Prashanth

  • Export data to excel using DOI(desktop Office integration) technique

    Hi Experts,
    I have the requirement to export data to excel file, I have some idea using OLE but no idea of exporting to excel using DOI, Please help me by providing sample code for it.
    My requirement also include merging of cells and coloring of cells.
    Thanks
    Rohit

    For merging of cells you can refer following code!
    [Merging of cells.|https://www.sdn.sap.com/irj/scn/wiki?path=/display/community/oleconceptfordownloadingthereportoutputintoexcel]
    Regards,
    Lalit Mohan Gupta.

  • How to upload data from excel to SAP and options to be used

    How to upload data from excel to SAP and options to be used
    thank you,
    Regards,
    Jagrut Bharatkumar shukla

    Hi Jagrut,
        You can use gui_upload.
    chk the sample program mentioned below.
    REPORT ZFTP .
    DATA: BEGIN OF I_FILE OCCURS 0,
    DATA(2000) TYPE C,
    END OF I_FILE.
    DATA: BEGIN OF I_FILE2 OCCURS 0,
    DATA(2000) TYPE C,
    END OF I_FILE2.
    DATA: W_COUNT TYPE I.
    PARAMETERS: P_FILEN TYPE STRING,
    P_FILE2 TYPE STRING,
    P_NUM(4) TYPE N..
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILEN.
    PERFORM F_FILE_GET USING P_FILEN TEXT-G01.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE2.
    PERFORM F_FILE_GET USING P_FILE2 TEXT-G01.
    START-OF-SELECTION.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = P_FILEN
    FILETYPE = 'ASC'
    HAS_FIELD_SEPARATOR = 'X'
    HEADER_LENGTH = 0
    READ_BY_LINE = 'X'
    DAT_MODE = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    CHECK_BOM = ' '
    VIRUS_SCAN_PROFILE =
    NO_AUTH_CHECK = ' '
    IMPORTING
    FILELENGTH =
    HEADER =
    tables
    data_tab = I_FILE
    IF SY-SUBRC <> 0.
    MESSAGE E024(Z1).
    ENDIF.
    LOOP AT I_FILE.
    W_COUNT = W_COUNT + 1.
    IF NOT W_COUNT > P_NUM.
    MOVE I_FILE TO I_FILE2.
    APPEND I_FILE2.
    ENDIF.
    ENDLOOP.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE =
    filename = P_FILE2
    FILETYPE = 'ASC'
    APPEND = ' '
    WRITE_FIELD_SEPARATOR = 'X'
    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 = I_FILE2
    FIELDNAMES =
    *& Form F_FILE_GET
    text
    -->P_P_FILEN text
    -->P_TEXT_G01 text
    FORM F_FILE_GET USING L_FILENA L_TEXT.
    CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
    DEF_FILENAME = ' '
    DEF_PATH = ' '
    MASK = ',.,*.TXT.'
    MODE = 'O'
    TITLE = L_TEXT
    IMPORTING
    FILENAME = L_FILENA
    rc =
    EXCEPTIONS
    INV_WINSYS = 1
    NO_BATCH = 2
    SELECTION_CANCEL = 3
    SELECTION_ERROR = 4
    OTHERS = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Reward if helpful.
    Regards,
    Harini.S

  • Report using the feature of opening Excel in SAP.

    We are building a custom report using the feature of opening Excel in SAP.
    We need to do things like:
    Protect the worksheet, but leave some rows unprotected
    Freeze the windows
    Have any one ever used this feature before? Can any know how to do this?
    Thank you,
    PV

    No, no extra somewhere.  What it actually is, is that you are calling the methods of the application(sort of).  Here is an example application which does to the freeze panes.
    report zrich_0001.
    include ole2incl.
    data: e_sheet type ole2_object.
    data: e_appl  type ole2_object.
    data: e_work  type ole2_object.
    data: e_col1  type ole2_object.
    data: e_col2  type ole2_object.
    data: e_cols  type ole2_object.
    data: e_cell  type ole2_object.
    data: e_wind  type ole2_object.
    data: field_value(30) type c.
    parameters: p_file type localfile default 'C:RichTest.xls'.
    start-of-selection.
    * Start the application
      create object e_appl 'EXCEL.APPLICATION'.
      set property of e_appl 'VISIBLE' = 1.
    * Open the file
      call method of e_appl 'WORKBOOKS' = e_work.
      call method of e_work 'OPEN'
              exporting
                   #1 = p_file.
    * Write data to the excel file
      do 20 times.
    * Create the value
        field_value  = sy-index.
        shift field_value left deleting leading space.
        concatenate 'Cell' field_value into field_value separated by space.
    * Position to specific cell  in  Column 1
        call method of e_appl 'Cells' = e_cell
               exporting
                    #1 = sy-index
                    #2 = 1.
    * Set the value
        set property of e_cell 'Value' = field_value .
    * Position to specific cell  in  Column 2
        call method of e_appl 'Cells' = e_cell
               exporting
                    #1 = sy-index
                    #2 = 2.
    * Set the value
        set property of e_cell 'Value' = field_value .
    * Position to specific cell  in  Column 3
        call method of e_appl 'Cells' = e_cell
               exporting
                    #1 = sy-index
                    #2 = 3.
    * Set the value
        set property of e_cell 'Value' = field_value .
      enddo.
      call method of e_appl 'Columns' = e_col1
             exporting
                  #1 = 1.
      call method of e_appl 'Columns' = e_col2
              exporting
                  #1 = 2.
      call method of e_appl 'Range' = e_cols
              exporting
                #1 = e_col1
                #2 = e_col2.
      call method of e_cols 'Select' .
      get property of e_appl 'ActiveWindow' = e_wind.
      set property of  e_wind 'FreezePanes' = 1.
    ** Close the file
    *  call method of e_work 'close'.
    ** Quit the file
    *  call method of  e_appl  'QUIT'.
    *  free object e_appl.
    Regards,
    Rich Heilman

  • Display of report in excel format.

    Hi,
      How to display a report in excel format?? I have the display details in an internal table.
        Is it possible for the output to come in excel format as soon as we  run the pgm other.than downloading from list or grid format..If so how to do it??Kindly help..
    Thanks..

    Hi,
    Once you have all the data in the internal table, just use function module 'Download' or 'WS_Download' and pass the parameters in function module like the below for example.
    if not i_list[] is initial.                          " i_list is an internal table  
    call function 'WS_DOWNLOAD'                          
          exporting                                       
               filename            = filename1            
               filetype            = 'DAT'                
          tables                                          
               data_tab            = i_list               
               fieldnames          = i_header     "i _header has the field names
          exceptions                                      
               file_open_error     = 1                    
               file_write_error    = 2                    
               invalid_filesize    = 3                    
               invalid_table_width = 4                    
               invalid_type        = 5                    
               no_batch            = 6                    
               unknown_error       = 7                    
               others              = 8.                   
    endif.
    Now, the excel will be created which has all the data.
    Hope this helps.
    Thanks,
    Srinivasa

  • Historical Report - export report in excel format

    Hi,
    We are on UCCX 8.0 (SU2). We have an issue with Historical when we tried to export report in excel format, the report does not display in correct column. It's very confusing. We could manually correct (rearrange) the column label but it take lots of time as we have so many reports.
    Is there anyway to fix this issue? Does anyone experience the same issue with Historical Report?
    I attached the pictures for example.
    Thanks,

    This type of behavior is a bug. I took a look in the bug toolkit and there are several defects filed against the Agent Summary report in 8.0 but not one that matches this behavior. I would venture a guess that a DE was sloppy when fixing another bug and introduced this on us.
    You should open a TAC case on this. It is also possible that this defect already exists but is not public in the toolkit yet.

  • Excel to SAP R/3

    Hi All,
    I need to create automation for uploading Excel data onto SAP R/3 using VBA.Have never done this before.Hence a few questions.
    1.Once SAP is installed what references do i need to put in the VB Editor under Tools->references in order to connect to SAP and use its objects?
    2.Can i achieve uploading of data from Excel using ODCBC.
    3.I searched the net for excel to SAP links and found a term called RFC functions.What is RFC.
    4.Do we need ABAP coding as well to achieve the same?
    If someone can help me with the code for uploading data from excel to SAP,it would be great.Any reply in this regard will be highly appreciated.
    Rgds

    okay, here we go. As said before, I'll post here a series of comments outlining the use of webservices in the office2003 family to interact with an NW ABAP backend.
    Specs: Office2003 with the Webservice Toolkit installed (Gregor's link; read the instructions carefully, especially make sure that you have the MSXML3.0-dll installed too); ABAP 6.40+ (I'll use a 7.0 system here); PHP5.2.0 with soap enabled for some quick tests;
    In this first and easiest example we will specify a report within a Word document and download the coding to the Word document.
    First we create the webservice on the backend, that is, a function module and let run the webservice wizard over it:
    FUNCTION ZTW_READ_REPORT.
    ""Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(PROGRAMM_NAME) TYPE  SY-REPID
    *"  EXPORTING
    *"     VALUE(LINES_OF_REPORT) TYPE  ZTW_TABLE_OF_CODE_LINES
    *"     VALUE(ERRORSTRING) TYPE  STRING
      errorstring = ''.
      refresh lines_of_report.
      read report programm_name into lines_of_report.
      if lines_of_report is initial.
        errorstring = 'No such report!'.
      endif.
    ENDFUNCTION.
    /code
    ZTW_TABLE_OF_CODE_LINES is a table based on the structure DDS02.
    Very simple, return the coding for a given report name or 'No such report!' in case it does not exist. RFC enable the FM!
    Next we run the webservice wizard and create a webservice ZTW_READ_Report and release it for the SOAP runtime.
    Now let's get the WSDL URL by selecting the webservice in transaction WSADMIN and clicking the WSDL button. A browser window opens and we copy the URL.
    Sidestep: Let's test the service in a PHP script run from the commandline (i.e. without webserver set up).
    <?
    $login    = "USER";
    $password = "PW123";
    $proxyhost = '111.222.333.444;
    $proxyport = 3128;
    // WSDL URL PL5
    $wsdlurl = "http://us4484.wdf.sap.corp:50084/sap/bc/srt/rfc/sap/ZTW_READ_REPORT?"
           . "sap-client=201&sap-user=" . $login . "&sap-password=" . $password . "&sap-language=DE&wsdl=1.1";
    $programm_name = $argv[1];
    try {
         $client = new SoapClient($wsdlurl,
           array(
           'proxy_host'  => $proxyhost,
           'proxy_port'  => $proxyport,
           'login'     => $login,
           'password'    => $password,
           'trace'       => true,
           'exceptions'     => true));
    catch(SoapFault $e) {
      echo 'Caught a Constructor Error: - ' . $e->faultstring;
    if (isset($client)) {
         try {
           $ra = $client->ZtwReadReport(array(
                'ProgrammName'         => $programm_name
         catch (SoapFault $e) {
           echo 'Caught an Error: - ' . $e->faultstring;
         if ($ra->Errorstring == "") {
         $node = $ra->LinesOfReport;
         foreach ($node as $val1) { //item
           foreach ($val1 as $val2) { //Line
                foreach ($val2 as $val3) { //Value
               echo $val3 . "
         else { echo $ra->Errorstring; }
    else { echo 'No client object!'; }
    ?>
    /code
    we can run this program from the (win) commandline with
    php scriptname.php reportname
    /code
    (make sure your php is on the path and that you're in the directory where your script is or use the full path name)
    Notice the full WSDL URL http://servername:50084/sap/bc/srt/rfc/sap/ZTW_READ_REPORT?sap-client=201&sap-user=USER&sap-password=PW123&sap-language=DE&wsdl=1.1";
    We'll need this URL in the next step.
    We open a MS Word Document and go to Tools|Macro|VisualBasic Editor. Inside the Editor we go to menu Tools and find an entry 'web service references' (unfortunately I've a German Version of Word at hand at the moment so I've got to guess a little, what the English menu entries might be called). If you do not find such an entry, your SOAP Toolkit installation did not work.
    Choosing this we get a dialog which, in the lower left corner allows to select 'webservice URL'. Enable this and enter the URL mentioned before. Click Search. If everything works, we get a description of our webservice in the right hand side box.
    Select the webservice found (mark the checkbox) and click 'Add'. This creates some VBA proxy classes representing your webservice.
    In the VisualBasic Editor they can be found on the left hand side box under Project|Class Modules. They are
    - clsof_Factory_ZTWREADREPORT
    - clsw_ZTWREADREPORTService
    - struct_D022S
    Let's have a look at clsw_ZTWREADREPORTService. In the comments at the start of the script we find an explanation about the originationg WSDL and something on the usage of this proxy.
    'Example:
    ' Dim ExampleVar as New clsws_ZTWREADREPORTService
    ' debug.print ExampleVar.wsm_ZtwReadReport("Example Input")
    /code
    Okay, all that's left to do, is to write a little Macro utilizing this proxy. Here we go:
    Insert a new module to your VBA project and create a subroutine inside.
    Sub read()
    Dim errorstring As String
    Dim lor As Variant
    Dim ExampleVar As New clsws_ZTWREADREPORTService
    Dim report_name As String
    report_name = InputBox("Report:")
    errorstring = ExampleVar.wsm_ZtwReadReport(report_name, lor)
    Selection.TypeText Text:="Report" & report_name
    Selection.TypeParagraph
    For i = LBound(lor) To UBound(lor)
        With Selection
          .Font.Name = "Arial monospaced for SAP"
          .Font.Size = 10
          .TypeText Text:=lor(i).Line & vbCrLf
        End With
    Next
    End Sub
    /code
    When executed (Tools|Macro|Macros->read), this macro pops up an input box, allowing you to enter a programme name, then downloads the coding of that report, formats it a little (10 pt Arial monospaced for SAP) and pastes it into our word document.
    Voilá, done.
    What have we learnt so far:
    - installing the SOAP toolkit into Office2003
    - testing a webservice using commandline PHP
    - creating webservice proxy functions in VBA
    - allow dynamic user interaction with the document (input box) and therefore subsequently with the webservice
    - calling a webservice from within an Office document (i.e. passing data to the ABAP Service & retrieving data from it)
    Basically, that is all you need to start. It works the same in every Office application. The better you know VBA now (especially the trilions of classes within the various applications) the fancier applications you can build. I'll try to chip in some ideas thereof in the next days.
    anton
    Message was edited by: Anton Wenzelhuemer
    Message was edited by: Anton Wenzelhuemer

  • CR 2008 Export Data to Excel Issue

    I have developed report in cr 2008 and embed it in vs 2005 window application. when i export that report to excel, i have to choice Excel and Excel Data Only. I tested both option but my exported report have extra blank columns and rows. That is very defficult to remove these extra rows and columns. Is there any solution that report exported like cr 9.
    Thanks
    Rafique

    The way exporting to excel has changed.  Since this does not work in the CR designer either, you will have to modify your report as described in the article [Exporting to Microsoft Excel|http://www.sdn.sap.com/irj/boc/go/portal/prtroot/docs/library/uuid/10d3ba69-951e-2b10-3093-e3cf287a57c9?quicklink=index&overridelayout=true]
    Ludek

  • Export data to Excel

    Hello All,
                I am trying to export data to Excel from a report output. Its a simple report. I have tried the below FM
    CALL FUNCTION 'RH_START_EXCEL_WITH_DATA'
    EXPORTING
      DATA_FILENAME             =
      DATA_PATH_FLAG            = 'W'
      DATA_ENVIRONMENT          =
      DATA_TABLE                =
      MACRO_FILENAME            =
      MACRO_PATH_FLAG           = 'E'
      MACRO_ENVIRONMENT         =
      WAIT                      = 'X'
      DELETE_FILE               = 'X'
    EXCEPTIONS
      NO_BATCH                  = 1
      EXCEL_NOT_INSTALLED       = 2
      INTERNAL_ERROR            = 3
      CANCELLED                 = 4
      DOWNLOAD_ERROR            = 5
      NO_AUTHORITY              = 6
      FILE_NOT_DELETED          = 7
      OTHERS                    = 8
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    This FM when executed without passing any data is able to open an empty excel sheet but when I try to pass an internal table to DATA_TABLE  its giving a dump. The run time error is CALL_FUNCTION_CONFLICT_TYPE.
    Error:
    **"The function module interface allows you to specify only fields      
    of a particular type under "TABNAME". The field "ITAB1" specified here
    has a different field type."**
    Please let me know if Im missing something.
    Thanks in advance.

    Hi SAP,
    Simply List -> Save -> File -> spreadsheet -> file.xls
    Or check this weblog..
    <a href="/people/dennis.vandenbroek/blog/2007/02/14/simple-function-module-to-export-any-internal-table-to-ms-excel:///people/dennis.vandenbroek/blog/2007/02/14/simple-function-module-to-export-any-internal-table-to-ms-excel
    or
    try this code..
    DATA : file_name TYPE ibipparms-path,
    lc_filename TYPE string.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    PROGRAM_NAME = SYST-CPROG
    DYNPRO_NUMBER = SYST-DYNNR
    FIELD_NAME = ' '
    IMPORTING
    file_name = file_name .
    lc_filename = file_name.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE =
    filename = lc_filename
    filetype = 'DAT'
    TABLES
    data_tab = gt_itab.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Revert back for more help
    Reward points if helpful
    Regards
    Naresh

  • Problem in exporting data to excel in nwds 7.3

    Hi All,
    I was using the following code for exporting data to excel in NWDS 7.3
    private IWDCachedWebResource getCachedWebResource(byte[] file, String name,
    WDWebResourceType type) {
    IWDCachedWebResource cachedWebResource = null;
    if (file != null) {
    cachedWebResource = WDWebResource.getWebResource(file, type);
    cachedWebResource.setResourceName(name);
    return cachedWebResource;
    I was getting the error in the following line cachedWebResource = WDWebResource.getWebResource(file, type); when I clicked the quick help it ststed the getWebResource method is depricated.  Kindly provide some assistance on what is the new method in its place.
    Thank you
    Regards,
    Preet Kaur

    Hi Ganesh,
    Thanks that worked fine, but when we go further we are facing problem ie
    byte[] excelXMLFile;
    IWDCachedWebResource cachedExcelResource = null;
    String fileName = dataNode.getNodeInfo().getName() + ".xls";
    try {
    // create Excel 2003 XML data as a byte array for the given context node,
    // attributes and headers
    excelXMLFile = toExcel(dataNode, columnInfos).getBytes("UTF-8");
    // create a cached Web Dynpro XLS resource for the given byte array
    // and filename
    cachedExcelResource = getCachedWebResource(
    excelXMLFile, fileName, WDWebResourceType.XLS);
    // Store URL and file name of cached Excel resource in context.
    if (cachedExcelResource != null) {
    wdContext.currentContextElement().setExcelFileURL(
    cachedExcelResource.getURL());
    wdContext.currentContextElement().setExcelFileName(
    cachedExcelResource.getResourceName());
    // Open popup window with a link to the cached Excel file Web resource.
    openExcelLinkPopup();
    } else {
    wdComponentAPI.getMessageManager().reportException(
    "Failed to create Excel file from table!", true);
    } catch (UnsupportedEncodingException e) {
    wdComponentAPI.getMessageManager().reportException(
    e.getLocalizedMessage(), true);
    } catch (WDURLException e) {
    wdComponentAPI.getMessageManager().reportException(
    e.getLocalizedMessage(), true);
    The above bold lines also would need to be converted to inputstream, but not sure how to correct that
    We are following the below pdf for the implementation.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/edc2f3c2-0401-0010-8898-acd5b6a94353?QuickLink=index&overridelayout=true
    Thank you
    Regards,
    Jaspreet Kaur

  • Export sections to Excel as individual tabs

    Hi,
    My report is sectioned for e.g by Area. Is there any way I can export this to excel as separate tabs i.e. a tab for each area?
    Any help would be appreciated.
    Regards,
    Aoife

    This question comes up quite often (hint, hint, SAP moderators), but alas, the answer is "no".  Within WebI and exporting to Excel, all tabs go across, unless you use "CSV" option in Infoview, but that is best left for another discussion.  If you poke around a bit in the Desktop client, I've heard of folks using VB script (or is that Visual Basic script?) and writing some code to generate a new Excel worksheet for each tab encountered, but it is not possible in WebI due to it not being a client tool -- it's a web tool....
    Thanks,
    John

  • Excel to SAP using VBA

    I would like to know if there is any possible way of exporting data from excelt to SAP using VBA code. I was going through one of the blogs /people/kathirvel.balakrishnan2/blog/2006/05/09/data-upload-into-sap-from-microsoft-excel-150-vba-part
    where in the data was exported from excel to SAP with the help of table name. Can the same be done using trasaction codes in SAP? If so, how.
    Also, I would like to know,if I can record a particular session(as how we do for recording a macro in excel) and use the same recorded session for other entries too.
    Thanks a lot in advance.
    Regards,
    P.Yogesh

    Hello,
    Whatz impossible ??
    Yes you can export the data from excel to SAP using VBA, but you need to create fome RFC in SAP as well that will handle the data you will send.
    1. Create a RFC function in R/3 that will read a file from specific location and perform the respective transaction.
    2. Create your excel file with respective file format and call the RFC function in SAP passing the parameters as file name and other required details.
    3. SAP coding for RFC will be a single time activity and then onwads you can just create excel file for upload and use VBA code to initiate the RFC call.
    Hope this make some sence. Tell me if you have more queries.
    Regards,
    Vishal
    Reward points.. if helpful

  • Error in "Export to Microsoft Excel" from Portal

    Hi,
    I have a BW report on Portal 7.0 with columns with time in format like hh:mm:ss.
    When I exported it to Excel and open this file I get inside Excel window an information window "Problems while loading" and explanation "Value of cell". After I send OK sheet of data is opening. The hours fraction of time in all cells is changed to hh+1.
    In log of this action ...\Temporary Internrt Files\Content.MSO\EB0B32EE.log are lines like:
    HTML Error of Cell Value:06:10:00
        where 06 ought to be 05.
    The text below is from Excel:
    <td class=3Dx547531 x:num=3D"06:10:00" style=3D" mso-number-format:'hh\:mm\:ss'"><font class=3DFx547530>05:10:00</font></td>
    Thanks in advance
    Grzegorz Szot

    Hi,
    I had the same problems (html inside excel) it was caused by wrong excel / bex versions because they were not compatible.
    In my mind your error is caused by the same problem.
    Ceck the compatibility matrix:
    [BEx Compatibility|https://websmp201.sap-ag.de/~sapidb/011000358700000227152003E/compatibility_bex_office.htm.] of MS Operating Systems and Office Products
    Business Explorer Suite: Platform Questions
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/1d43766a-0901-0010-0a9b-85eb1089fb17
    Bog:
    /people/community.user/blog/2007/06/27/using-the-bi-7x-add-on-for-sap-gui-710--requirements
    If this does not help and you found no solution you can check this notes on relevance:
    NW 7.0 BI Web Applications - Excel export of time cells
    SAP Note Number: [1152146|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bw_bex/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d31313532313436%7d]
    NW04s BI Web Excel export: Data cells exported as text
    SAP Note Number: [982305|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bw_bex/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d393832333035%7d]
    Error during export to MS Excel with certain templates
    SAP Note Number: [1148493|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bw_bex/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d31313438343933%7d]
    NW2004s BI Excel export date is generation time-dependent
    SAP Note Number: [1086420|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bw_bex/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d31303836343230%7d]
    Hope this helps. Don't forget to assign points if it was helpful.
    Regards
    Andreas

Maybe you are looking for