Excel file to XML file

Hi Expets!
I have a requirement to convert  Excel file to XML file. This is new to me . When i serach in SDN i came to know that we want to create an EJB Module. I am not having much knowledge in Java bean. we are using the PI7.1 version.
I need to know what is the basic requirements for creating this EJB Module and also some inputs for how to start with this scenario.
Thanks and Regard's
Preethi.

u have to create a adapter module for the same...
/people/shabarish.vijayakumar/blog/2009/04/05/excel-files--how-to-handle-them-in-sap-xipi-the-alternatives
http://wiki.sdn.sap.com/wiki/display/ABAP/AdapterModuleToReadExcelFilewithMultipleRowsandMultiple+Columns
/people/sap.user72/blog/2005/07/04/read-excel-instead-of-xml-through-fileadapter
Libraries for adapter module development:
http://wiki.sdn.sap.com/wiki/display/XI/Where%20to%20get%20the%20libraries%20for%20XI%20development
how to create adapter module in PI7.1:
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/c0b39e65-981e-2b10-1c9c-fc3f8e6747fa

Similar Messages

  • Regarding Excel output of XML file

    When i am trying to open the output of XML file. I am getting the below dialogue boxes before report getting openend. Can any one help to resolve this issue.
    Dailogue box 1
    Open XML
    Please select how you would like to open this file:
    As a XML table
    As a read-onlyworkbook
    Use the XML Source task pane
    Dialogue box 2
    Microsoft office excel
    The Specified XML Source does not refer to a schema. Excel will create a schemabased on the XML source data.

    plz see
    How To View / Open Concurrent Requests With The Excel Application [ID 377424.1]
    How to Control the Name and the Application that Opens the Concurrent Request Output File on the Client? [ID 316752.1]
    How to Setup The Report Output to Different Viewer Types in Oracle Applications [ID 184375.1]
    http://sairamgoudmalla.blogspot.com/2009/04/concurrent-program-output-in-ms-excel.html

  • XML PUBLISHER : excel file generated is of large size

    Hi ,
    scenario: Using XML publisher I am able to get the output in the Excel format but the file size is 28.2 MB
    Issue : The file size is too big so unable to send email through XML bursting program.
    Observation:
    For the generated excel sheet when save as option is chosen then its save as type is Web Page (*.htm,*.html ) with the file name appearing in double quotes "sample.xls" , when the save as type was changed to excel and saved , the file size was found to be 5.7 MB .
    Please advise on the following:-
    xml publisher's generated output file size is 6 times bigger than the actual excel file size , is there a way to rectify this huge size output for EXCEL file.
    Regards,
    SR

    This is a know Bug, Refer below document for the patch detail & other info:
    BI Publisher Enterprise Excel Output File Size is Too Large [ID 1271544.1]
    BUG:6739943 ,7356451
    Thanks,
    Sandeep

  • How to read the data from Excel file and Store in XML file using java

    Hi All,
    I got a problem with Excel file.
    My problem is how to read the data from Excel file and Store in XML file using java excel api.
    For getting the data from Excel file what are all the steps i need to follow to get the correct result.
    Any body can send me the code (with java code ,Excel sheet) to this mail id : [email protected]
    Thanks & Regards,
    Sreenu,
    [email protected],
    india,

    If you want someone to do your work, please have the courtesy to provide payment.
    http://www.rentacoder.com

  • How can I convert an Excel file to XML file

    The problem is I am given an Excel file and have been asked to convert it to an XML file using Java.Can any body highlight any clue regarding this? My thanks in advance.

    Gotta use your own imagination.
    I'd have a root tag <excel-spreadsheet>. Under that I'd have a <worksheet> tag for each worksheet. Under that I'd have a <row> tag for each row. Each <row> tag would have <column> tags, with "name" attribute, and the spreadsheet entry as the value.
    The problem is that you can't really map everything that will go into a spreadsheet into this stream (e.g., graphs, stray cells, etc.) It maps well to tables, but that's it.

  • How to create an Excel file from XML in the Receiver File Adapter Comm Ch

    How do I create an Excel file from XML in the Receiver File Adapter Communication Channel? I have my mapping done and I am outputting the file as a comma delimited csv file. However, the target can only process an Excel file (.xls). How can I generate an Excel in XI?
    I saw this blog, but I don't know how to create a XSLT transformation.
    /people/michal.krawczyk2/blog/2005/12/10/xi-generating-excel-files-without-the-java-nor-the-conversion-agent-not-possible
    Any help would be appreciated. Thanks.

    Here are the steps I took to create an XSLT transformation in XI 3.0:
    1. I created my source and target XSDs using XMLSpy.
    2. I created the XSLT mapping from source to target in XMLSpy (referencing the souce XSD schema).
    3. I created another XSLT mapping to format the target into Excel XML.
    4. Import the source and target XSDs in the IR's External Definitions
    5. Zip each XSLT mapping (.xls) and import it into the IR's Imported Archives
    6. Reference the XSL mappings in the Interface Mapping

  • Comparing an excel file to and xml file and appending data to the xml file

    I have an xml file (mapsource) and an excel file. One of the columns in the excel file matches up with a node in the xml file. I want to be able to loop through both files and add a new node to the xml file where the one of the columns in the excel file matches a node in the xml file.
    I can create a query object out of the excel dosument using the cfspreadsheet tag.
    I'm able to use xmlparse to create a xml document object from the xml file.
    What I would like to do is add col_3 from the excel spreadsheet as a new node when col_2 is equal to gpx.wpt.name.xmltext of the xml object.
    Any help or direction would be very helpful!

    Hi,
    Thank you for your reply. But I have to attach an excel file from a particular path (C:\TEMP\TEST.XLS) and I have to send that excel file to the user inbox.That excel file has multiple sheets with data. Can you please provide me any code is available.
    Thanks and Regards
    venkat.

  • PeopleCode to "Save As" - convert an excel file to XML file

    All,
    Is there any way to convert an excel file to XML file via PeopleCode? I can manually "Save As" an excel file to be an XML file, but is there anyway of doing it via PeopleCode? I guess it would be a little possible via VBScript, but since by App server resides on a Unix box, that would not work.
    Any help would be really appreciated.
    Thanks,
    Mani

    The attached zip file contains several VI's to read and write directly to Excel using ActiveX. There are several example VI showing how to use everything. This set is saved in LabVIEW 6.0.2.
    I suggest you unzip these to your user.lib directory so you'll be able to easily access them from the functions palette.
    I have not actually used these, but others that have say they have worked well for them.
    Good Luck
    Ed
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
    Attachments:
    excel_lv6i.zip ‏898 KB

  • XML to Excel file using dom4j

    hi!
    i'm new with dom4j and i don't have any idea on how to do the following task:
    i have an xml document which i have to save as an excel file using dom4j. my problem is i also have to insert records in the middle of the file. is it possible?
    sample layout:
    Worksheet Header (also have to plot a value)
    Column Header (also have to plot a value)
    -- need to insert records here --
    Sub-total row
    Total row
    i would appreciate any help from you guys...
    thanks in advance...

    Hi there!
    First I haven't seen any application that uses dom4j to write excel's file, but I can recommend you to use Apache's POI to write and read from any excel's file, actually I'm working rigth now with it, and works fine with Office 2003.
    http://jakarta.apache.org/poi/hssf/
    For the XML you can use what ever you feel confortable with, dom4j, jdom, etc. I really like jdom thougth

  • How to convert  XML file to excel file

    To convert XML file to excel file. what are the jar files required. also tutorial to convert XML File to excel file

    Gotta use your own imagination.
    I'd have a root tag <excel-spreadsheet>. Under that I'd have a <worksheet> tag for each worksheet. Under that I'd have a <row> tag for each row. Each <row> tag would have <column> tags, with "name" attribute, and the spreadsheet entry as the value.
    The problem is that you can't really map everything that will go into a spreadsheet into this stream (e.g., graphs, stray cells, etc.) It maps well to tables, but that's it.

  • Problems with Adapter module converting Excel file to XML

    Hi All,
    I have created an adapter moduel to convert the input excel file to XML and have deployed it. While testing we found that there is an extra empty record with empty elements added additionally. Can anyone help on this?
    Below is the convert function used for it.
    public byte[] convert(byte src[],String msgType,String nameSpace) throws Exception
                        String xmldata = "";
                        try
                               ByteArrayInputStream byteArr= new ByteArrayInputStream(src);
                               Workbook wb = Workbook.getWorkbook(byteArr);
                               Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"AO: Conversion Started.");
                               xmldata ="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n"+ "<ns0:"+msgType+" "+"xmlns:ns0=\""+nameSpace+"\">";
                               Cell[] cells ;
                               Cell[] cellNames ;
                               cellNames = wb.getSheet(0).getRow(4);
                               for(int j=5;j<wb.getSheet(0).getRows();j++)
                                       xmldata = xmldata+"<Record>";
                                       cells = wb.getSheet(0).getRow(j);
                                       for(int i=1;i<wb.getSheet(0).getColumns();i++)
                                            xmldata = xmldata+"<"+cellNames<i>.getContents().replaceAll(" ","")+">"+cells<i>.getContents()+"</"+cellNames<i>.getContents().replaceAll(" ","")+">";
                                       xmldata = xmldata+"</Record>";
                                xmldata = xmldata + "</ns0:"+msgType+">";     
                                                            wb.close();
                         catch (Exception e)
                             Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,"AO: Exception in Convert Method.");
                         return xmldata.getBytes();
    Regards,
    Malini
    Edited by: malini balasubramaniam on Mar 5, 2010 7:28 AM

    Hi,
    xmldata = xmldata+"<Record>";
    cells = wb.getSheet(0).getRow(j);
    for(int i=1;i<wb.getSheet(0).getColumns();i++)
    xmldata = xmldata"<"cellNames<i>.getContents().replaceAll(" ","")">"cells<i>.getContents()"</" ","")">";
    xmldata = xmldata+"</Record>";
    Can u please change this part of code as
    Hi,
    cells = wb.getSheet(0).getRow(j);
    if(cells.size()>0)  
    xmldata = xmldata+"<Record>";
    for(int i=1;i<wb.getSheet(0).getColumns();i++)
    xmldata = xmldata"<"cellNames<i>.getContents().replaceAll(" ","")">"cells<i>.getContents()"</" ","")">";
    xmldata = xmldata+"</Record>";
    Check first if the row is empty...
    im nt sure it is cells.size() or cells.length.. please try both
    Thanks & Regards
    Babu

  • Q: XML Publisher build template on Word then Output to Excel file

    Hi All
    When create template on MS-Word then output to Excel file
    When Data Format include percentage then output to Excel The Excel just only show two decimal
    Ex: 9.6549% Excel show ->9.65%
    * Except 9.6549% on Excel *
    Thanks
    Johnson

    Hi
    What version of XML/BI Publisher you have?
    Thanks
    Ravi

  • FM to mail a excel file generated by XML

    Hi All,
    I have a requirement to generate fancy excel file as attachment in mail.
    Please help with some FM to send mail with excel as attachment,
    I have used a code like the sample code given below.
    *&amp;----
    **&amp; Report  ZTEST_NP_EXCEL_XML
    **&amp;
    **&amp; Download the formatted excel file using XML
    *&amp;----
    report Z_IXML.
    TABLES USR02.
    TYPES XMLLINE(1024) TYPE C.
    DATA IT_XML TYPE XMLLINE OCCURS 0.
    DATA WA_XML TYPE XMLLINE.
    DATA FNAME(60) TYPE C VALUE '/ft/D02/001/test.xls'.
    \ Build-up of xml in internal table
    \\* Opening tags
    APPEND '<?xml version="1.0"?>' TO IT_XML.
    APPEND '<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"'
    TO IT_XML.
    APPEND 'xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">'
    TO IT_XML.
    APPEND ' <Worksheet ss:Name="Tabelle1">' TO IT_XML.
    APPEND ' <Table>' TO IT_XML.
    \\* The actual data from table USR02
    SELECT * FROM USR02.
    APPEND ' <Row>' TO IT_XML.
    CONCATENATE ' <Cell><Data ss:Type="String">'
    USR02-BNAME '</Data></Cell>' INTO WA_XML.
    APPEND WA_XML TO IT_XML.
    CONCATENATE ' <Cell><Data ss:Type="String">'
    USR02-TRDAT '</Data></Cell>' INTO WA_XML.
    APPEND WA_XML TO IT_XML.
    APPEND ' </Row>' TO IT_XML.
    ENDSELECT.
    \*Closing tags
    APPEND ' </Table>' TO IT_XML.
    APPEND ' </Worksheet>' TO IT_XML.
    APPEND '</Workbook>' TO IT_XML.
      DATA: window_title TYPE string,
            fullpath TYPE string,
            path TYPE string,
            user_action TYPE i,
            default_extension TYPE string,
            default_file_name TYPE string,
            file_filter TYPE  string,
            filename TYPE string,
            initialpath TYPE string.
    File selection
      MOVE '.XLS' TO default_extension.
      MOVE 'XLS files (.XLS)|.XLS' TO file_filter.
      CALL METHOD cl_gui_frontend_services=>file_save_dialog
        EXPORTING
          default_extension = default_extension
          default_file_name = default_file_name
          file_filter       = file_filter
          initial_directory = initialpath
        CHANGING
          filename          = filename
          path              = path
          fullpath          = fullpath
          user_action       = user_action
        EXCEPTIONS
          cntl_error        = 1
          error_no_gui      = 2
          OTHERS            = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = fullpath
          filetype                = 'ASC'
        TABLES
          data_tab                = it_xml
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 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.
    Please help
    I am giving a sample code how

    Hi Supratik,
    Please refer to these two links:
    Send email with 1 excel file and multiple sheet
    How to Convert file to excel and send it via email
    Hope this will resolve your issue.

  • How to convert excel file into xml file

    Friends
    Will you please help me out becz i am daily getting excel file from SAP which i have to translate into the xml file.
    Waiting for ur reply.
    Hitesh

    Depends on how your excel document looks like and what you wish to accomplish.
    First, save the excel file as a tab or comma separated file.
    Create a program that reads the lines of the file, and just print the cell content into the right xml tags.
    E.g.
    Street Name
    Main st 3 Wild Bill
    Main st 2 Crazy Bill
    could be translated into an xml:
    <Adress>
    <Street>Main st 3</Street>
    <Name>Wild Bill</Name>
    </Adress>
    <Adress>
    <Street>Main st 2</Street>
    <Name>Crazy Bill</Name>
    </Adress>
    or:
    <header>
    <col>Street</col>
    <col>Name</col>
    </header>
    <row>
    <col>Main st 3</col>
    <col>Wild Bill</col>
    </row>
    <row>
    <col>Main st 2</col>
    <col>Crazy Bill</col>
    </row>
    etc
    E.g. using the code
    String[] lineColumns=...
    while(lineColumns!=null){
      println("<row>");
      for(int i=0; i<lineColumns.length; i++){
        println("<col>"+lineColumns[i]+"</col>");
      println("</row>");
      ...Gil

  • Translation of excel file to an xml file

    hello
    does any one know how do I translate an Excel File to enter to the XI as XML file?
    (XI 3.0 version, SP21)
    Thanks
    Kfir

    Module acts as a special function that is used by an Adapter to provide the additional functionality to the Adapter.
    By using File Adapter we can only read .xml files and .txt files (using File Content Conversion). 
    If we want to read an excel sheet, it is not possible by using the normal File Adapter.
    For this purpose we are developing a module & Deploying it into the sap j2ee server and we will specify the module name in module tab of Communication channel.
    Then this module will read excel sheet and convert that into an xml format which XI can understand.
    Thanks.

Maybe you are looking for