Create XLS file

Hello,
My XI objects receive the result of an RFC function module that is a table of material master information. Now I need to create a .XLS file to the destiny server.
How can I do that? I read that post /people/michal.krawczyk2/blog/2005/12/10/xi-generating-excel-files-without-the-java-nor-the-conversion-agent-not-possible about creating an excel XML file but I don't need that solution.
I think  there is a way with java code but I'm not a Java programmer I'm an Abaper. Is possible with abap code?

Y dont u use this
/people/sap.user72/blog/2005/07/04/read-excel-instead-of-xml-through-fileadapter
This was again using java. It was possible with java because through java u can create adapter modules which is not possible through abap code
Regards,
Prateek

Similar Messages

  • Creating .xls file Using Java I/O

    Hi,
    I am crearting a .xls file from a oracle database that support japanese charsets(i.e it has data in UTF-8 format). I am creating the file using below java statements:
    1. Writer out = new OuputStreamWriter(new FileOutputStream("temp.xls"));
    2. out.write(data);
    So using above statements I am reading data in UTF-8 format and writing it a file using UTF-8 format.
    But my created .xls files does not allow me to see japanese characters as they visible in a browser. But in place of temp.xls if I use temp.txt or temp.doc , then I am able to see the japanese characters when those files are view using TEXTPAD OR MS-WORD APPLICATIONS.
    I have japanese font installed on my machine. So I am not understanding where the actual problem is with my way of file writing or with MS-EXCEL APPLICATION ....
    Please suggest me some solution ....
    Thanks in advance......
    kumar.

    Actually the way u have told result in the same. Even the file is .csv or .xls I am not able to see some japanese characters in my excel application provided I have japanese fonts installed on my machine. But when using the same servlet if i create an .doc or .txt file i am able to see japanese characters when i open .doc or .txt using MS-WORD OR TEXTPAD LIKE APPLICATIONS.

  • Create XLS file of 12 lakhs rows stored into oracle database.

    Respected All,
       My requirement is :
    Into my database , in one of my table has 12 lakhs rows. Now I want to create a PLSQL procedure which can convert all those rows into Microsoft .XLS file.
    So I tried out with Procedure below : -
    CREATE OR REPLACE PROCEDURE SCOTT.EMPLOYEE_REPORT(
    DIR IN VARCHAR2, FILENAME IN VARCHAR2) IS
    F UTL_FILE.FILE_TYPE;
        CURSOR AVG_CSR IS
        SELECT ENAME, DEPTNO, SAL
        FROM EMP;
    BEGIN
    F := UTL_FILE.FOPEN(DIR, FILENAME,'W');
    UTL_FILE.PUT_LINE(F, 'REPORT GENERATED ON ' ||SYSDATE);
    UTL_FILE.NEW_LINE(F);
    FOR EMP IN AVG_CSR
    LOOP
    UTL_FILE.PUT_LINE(F,
    RPAD(EMP.ENAME, 30) || ' ' ||
    LPAD(NVL(TO_CHAR(EMP.DEPTNO,'9999'),'-'), 5) || ' ' ||
    LPAD(TO_CHAR(EMP.SAL, '$99,999.00'), 12));
    END LOOP;
    UTL_FILE.NEW_LINE(F);
    UTL_FILE.PUT_LINE(F, '*** END OF REPORT ***');
    UTL_FILE.FCLOSE(F);
    END EMPLOYEE_REPORT;
    COMMAND TO EXECUTE THE PROCEDURE IS : - >
    EXEC EMPLOYEE_REPORT('UTL_FILE','TEST.XLS')
       in this package , I used scott user table for the r & d.
    While I execute this package , I got the error :
    ORA-29280: invalid directory path
    ORA-06512: at "SYS.UTL_FILE", line 18
    ORA-06512: at "SYS.UTL_FILE", line 424
    ORA-06512: at "SCOTT.EMPLOYEE_REPORT", line 8
    ORA-06512: at line 1
       KINDLY HELP ME TO SOLVE THIS PROBLEM
    THANKS/ REGARDS
    HARSH SHAH
    URMIN GROUP OF COMPANIES

    Hi,
    first of all try to use international measures. Any time I see lakh I have to google to find what it is.
    So you are trying to put in an Excel file 1.200.000 records (more than 1 million).
    Actually even if you would produce such file Excel will not be able to load it.
    Even in the latest version of Excel (2013) the maximum number of rows per sheet are 1,048,576 (source: Excel specifications and limits - Excel - Office.com).
    So if you will try to load in Excel such a big file you will get an error.
    And, as Blue has said, you are not producing an Excel file with your statement.
    Regards.
    Al

  • Create XLS file with XML data

    Hello,
    Is there Java libraries to create Excel files from XML data, like FOP that creating PDF files ?
    Another question : where can I find the javadoc of FOP's classes, particularly org.apache.fop.apps.Driver class ? Because I can't find it on http://xml.apache.org
    Thanks

    Use http://jakarta.apache.org/poi/

  • To read xls file content

    Hi all
    I want read the content of a xls file.
    For creating xls file am used poi.
    On reading xls hoe to get the column and row count.
    pls reply with example
    thanks for reply.

    You're already using POI to create XLS files. Guess what, you can also use the same to read XLS files. If your problem is more that you don't know how, then just read the documentation and code examples which come along it (and are available at its homepage).

  • Can't open .xls files created by Numbers

    All of a sudden, using Numbers '09 I can no longer open certain .xls files that I created in the first place by saving .numbers files as Excel files (using the "Save copy as Excel Document" checkbox in the Save As... dialog box). Some will open, but the vast majority attempt to open, and then I get an "Import Error - An unknown error occurred." message. Backed up copies of the same files produce the same result. New .numbers files I save as Excel documents can't open either.
    Background: Earlier tonight while saving a .numbers file as an Excel Document, the blue "progress" bar got about halfway and then just hung there. Having not rebooted the computer for a couple of weeks, and lots of apps open, I proceeded to shut down other processes and eventually the blue progress bar finished and an Excel file was saved. However, after rebooting the computer, the above inability to open Excel files started to occur. Something in the "save as" process must have corrupted?
    I quit Numbers, deleted the com.apple.iwork.numbers.plist file from Library/preferences, emptied trash, and restarted Numbers -- but that didn't solve the problem.
    What would you all suggest now at this point? Would reinstalling Numbers solve this? (hmmn, where is that disc?) I'm personally fine with the .numbers format, but my clients are not, hence the need to save as Excel documents. Any help would be appreciated!

    ack, this whole thing is frustrating. I can create new .numbers documents, save them as Excel documents, and those resulting .xls documents will open fine. HOWEVER, if I grab an old .xls document from a time machine backup (over a month ago), I cannot open it. Nor can I open an newly saved .xls document saved from the same original .numbers file.
    It would seem that the only thing I can do now is take those old .numbers files and copy/paste the content into a brand new .numbers file. After saving as, the resulting .xls files open fine (with the usual "import warnings", but I'm used to those )

  • Creating an XLS file and Zip it

    Hi All,
    we have a requirement where in we have to create an XLS file from internal table. This xls file then has to be zipped and mailed.
    If anyone knows how to create an xls file and zip it in WebDynpro, without using OPEN, CLOSE DATA SET etc, Please let us know. It will be of great help.
    Thanks,
    Anand

    >2) Convert the STRING format to XSTRING format by using the FM SCMS_STRING_TO_XSTRING.
    Actually you should use CL_BCS_CONVERT=>STRING_TO_XSTRING now.
    >3) Use the method COMPRESS_BINARY of class CL_ABAP_GZIP to compress the XSTRING file.
    You probably want to use CL_ABAP_ZIP instead of CL_ABAP_GZIP.  CL_ABAP_GZIP only does compression, which is fine for storing a single packet of data in the database.  However CL_ABAP_ZIP is better suited for mult-part zip (multiple inner files).
    >4) Use the method SEND_WEB_MAIL of class CL_HRRCF_SERVICES_MAIL to mail across the zipped contents.
    This seems to be an HR specific class. Better to use the cross application, NetWeaver provided functionality for sending mail - CL_BCS.

  • XLS Files created by SSRS will not open in Numbers on the iPad

    The company I work for creates business intelligence reports which are used in an education environment and are created daily and e-mailed out to staff.  These reports contain fairly simple tables with pupil data.
    One customer uses iPads extensively to maximise the quick response to this (behaviour) data.  There is an issue which seems to be prevalent in newer versions of Numbers where these documents can not be opened.  I note a previous discussion on this matter where the only solution was to save the file in excel and then the sheets would open.  This is not really an option here.
    I presume that there is some data missing in the header of the XLS file or something but if anyone has any information on this, especially if I can adapt the report in any way to include this data, please let me know if you have overcome a similar issue and how you went about it.
    Thanks,
    Pete H

    Hi - thank you for your responses.  I don't have an iPad so testing is all being done on site.
    The report is based on three tabs, each producing a basic table with data in.  I can create the reports in CSV and they work fine although the format is all wrong (no tabs etc etc) - but that would lead me to believe that it is nothing in the actual data which is causing the load error.  It also seems fairly intermittent, so I tested with a few different file sizes to make sure it wasn't this - and again nothing too conclusive there.
    I presume quicklook is the built in function to view a file, I spotted this today but again it won't open in that or then again when asked to open in Numbers.
    Hunting around this forum it seems there is some issue in general with opening some XLS files (especially ones created by SSRS) depending on iOS version, so that is the route I will be looking at tomorrow.  Putting these files through a save loop in excel isn't really an option, so I am going to test with a go between e-mail tomorrow which has in some cases seemed to do the trick - maybe appending something to the original file.  Some other posts have suggested that an XLSX file seems to work a lot better and that is supported in MS SQL 2012 which is on the way for our customers at some point.
    Definitely an awkward one!
    Thanks,
    Pete

  • How to wrap a cell in a xls file created from SQLplus

    Hi,
    I have the following sql script in Unix which creates a xls file for me -
    set pagesize 9999 lines 130                                                    
    set echo off                                                                   
    set termout off                                                                
    set markup HTML on                                                             
    set enpmap off                                                                 
    spool $test/userxyz/testfile.xls;                                   
    -- BEGIN:  Data exctraction from REFINTEG                             
    ttitle ' REPORT FOR DATABASE x1111y0'                                          
    select ' ' || error_message as ERROR, ' ' || error_type as TYPE, '&nbs
    p;' || data_selection as DATA_SELECTION, ' ' || description as DESCRIPTION,
    ' ' || npp as NPP, ' ' || item as item                    
    from   refinteg;                                                       
    spool off;          
    set markup HTML off;
    EXIT;               
    /                    The xls file I am getting needs to have the DESCRIPTION column as wrapped. i.e the contents will sizing the cell.
    Could you provide any leads as to how to include this formatting in my sql script.
    Thanks.

    I am trying to give a snapshot of how my csv is looking like currently and how I want it to be -
    Error      Type      Data_Selection    Description                      NPP      Item
    AAA         new       nsdancsjjsjqs      abc=123 xy=12 pq=34      john       12345678
    BBB         old         dsiuhfdcndhjd      mno=345 cd=56 ij=89      kate       23456667
    How I want it to look like (pls. note the Description column) -
    Error      Type      Data_Selection    Description                      NPP      Item
    AAA          new       nsdancsjjsjqs      abc=123                          john      12345678
                                                        xy=12
                                                        pq=34
    BBB         old        dsiuhfdcndhjd      mno=345                         kate       23456667
                                                     cd=56
                                                     ij=89
    i.e each of the new values in the description column of my spreadsheet would occupy a newline inside the same cell.I do not know how this can be achieved in the SQLplus. Do we need to add any formatting parameters in the sql file.
    Thanks.

  • What is the best, most efficient way to read a .xls File and create a pipe-delimited .csv File?

    What is the best and most efficient way to read a .xls File and create a pipe-delimited .csv File?
    Thanks in advance for your review and am hopeful for a reply.
    ITBobbyP85

    You should have no trouble doing this in SSIS. Simply add a data flow with connection managers to an existing .xls file (excel connection manager) and a new .csv file (flat file). Add a source to the xls and destination to the csv, and set the destination
    csv parameter "delay validation" to true. Use an expression to define the name of the new .csv file.
    In the flat file connection manager, set the column delimiter to the pipe character.

  • How to create a xls file from String [ ][ ]

    Hi, I have a java class where I can read the content of files xls and store this information in a String [][].
    But now, I have to do the opposite.
    I have a String[][] where the information is. And I have to guard this information in a file xls.
    My code when I read xls to String[][] is:
    import java.io.*;
    import java.io.File;
    import jxl.Workbook;
    import jxl.Sheet;
    import jxl.Cell;
    import jxl.*;
    public class ReadfichExcel
        private static int numCols;
        private static int numRows;
    public static String[] dimensionFile(String pathFolder, String file){
        String [] dimension = new String[2];
        try{
            Workbook libro = Workbook.getWorkbook(new File(pathFolder+"/"+file));
            Sheet hoja = libro.getSheet(0);
            numRows = hoja.getRows();
            numCols = hoja.getColumns();
        catch (Exception e)
            e.printStackTrace();
            return null;
        dimension[0] = String.valueOf(numRows);
        dimension[1] = String.valueOf(numCols);
        return dimension;
    }How can I do to create a file xls with the information of a String [] []?
    Thanks very much

    I have solved the problem:
    http://www.andykhan.com/jexcelapi/tutorial.html#writing
    What do you want to do then? Do you want to read the contents of the Excel file into the array?I only wanted to create a xls file with the information I have in a String[][]. The code I posted before is the code I ussually use to read a xls file.
    Next to create and write a xls file I'd do:
    public static int CreateTemp (File folderUser, String file, String [][] table)
        int exito = 0;
        int rows = table.length;
        int cols = table[0].length;          
        if (!folderUser.exists())
            folderUser.mkdir();
        try
            WritableWorkbook libro = Workbook.createWorkbook(new File(folderUser+"/"+file));
            WritableSheet hoja = libro.createSheet("First Sheet",0);
            // BEGIN TO WRITE
            for (int i=0;i<rows;i++)
                for (int j=0; j<cols;j++)
                    Label label = new Label(j, i, table[i][j]);
                    hoja.addCell(label);
            }// FOR
            // All sheets and cells added. Now write out the workbook
            libro.write();
            libro.close();
            exito = 1;
        } catch (Exception e)
                e.printStackTrace();
                return 0;
        return exito;
    }Another question. As I want to copy into the xls file the information in the String[][], Is right to do this using as follow:
    Label label = new Label(j, i, table[i][j]);
    hoja.addCell(label); (there will be characters and numbers in the cells)
    Thanks for your response.

  • Can't open xls file created by windows excel

    when i try to open a xls file created by windows excel, my numbers (3.2.2) tells me that " 'file name' cannot be opened' please help, thank you!

    ack, this whole thing is frustrating. I can create new .numbers documents, save them as Excel documents, and those resulting .xls documents will open fine. HOWEVER, if I grab an old .xls document from a time machine backup (over a month ago), I cannot open it. Nor can I open an newly saved .xls document saved from the same original .numbers file.
    It would seem that the only thing I can do now is take those old .numbers files and copy/paste the content into a brand new .numbers file. After saving as, the resulting .xls files open fine (with the usual "import warnings", but I'm used to those )

  • Create an XLS file, ZIP it and Email

    Hi All,
    we have a requirement where in we have to create an XLS file from internal table. This xls file then has to be zipped and mailed.
    The problem is we dont have GUI object. We will be executing this in batch.
    If anyone knows how to create an xls file and zip it in with out having GUI Component please let us know. It will be of great help. Also please let us know if it possible with out using OPEN, CLOSE DATA SET etc,
    Thanks,
    Anand

    You could try using SAP Desktop Office Integration. Within the interfaces i_oi_document_proxy and i_oi_spreadsheet there is a method save_to _url. With that method you can save your generated excel file to the appserver.
    The next challenge is to get the excel file and zip it with the help of class cl_abap_gzip.
    The last challenge is to mail the file. The class cl_bcs could be of help to you.
    Hope it helps you,
    Bert

  • I received an email containing a spreadsheet created using Mac Office 2004 on my new MacBook Air equipped with Mac Office 2011.  When I saved the document, my Finder lists the document without the .xls file extension. Why?

    I received an email containing a spreadsheet created using Mac Office 2004 on my new MacBook Air equipped with Mac Office 2011.  When I saved the document, my Finder lists the document without the .xls file extension. Why?
    All other .xls documents created by Mac Office 2004 retained the .xls file extention when I migrated them over to the new MacBook Air.

    I know what happened.  When I saved the document I somehow hit the Hide File Extension box.  Sorry to trouble this group. I simply resaved it w/o activating the Hide File Extension feature.

  • Unload Creates a .sql file in addition to an .xls file

    Hi All, I've recently downloaded version 3.0.02 which I use to create queries for database interrogation. I tend to export to Excel regularly and I'm finding that every time I unload an .xls file a .sql file is created in tandem.
    I have no use for this and have tried many different settings in the preferences area to stop it being created but to no avail - in addition the unload seems to take as long as the original query as if the query is being rerun - can somebody tell me what I'm doing wrong? Many Thanks, Steve.
    Edited by: user4230213 on 10-Dec-2010 02:25

    Is the additional file you are seeing the Generated-<date-time>.sql file?
    This file is generated when using a Save As type that can potentially create multiple sql files. It should not be created when generating Save As Single File. When we create a single sql file during the export, a generated control file is not needed and we should not create it... even if the Save As type is separate files, type files or separate directories. However, I can see that we are generating that control file when the Save As type is separate files, type files or separate directories cases and we created just 1 export file.
    Selecting the SaveAs type as single file should get you around the problem.

Maybe you are looking for

  • Sharing a bean btwn two JSP's

    Hi all I have a bean that I want to use in two JSP's. When I use it the first time it works fine but for the second JSP it returns a NullPointerException. I have my scope as "application". In my JSP I am calling the bean as such: <jsp:useBean id="abc

  • Student life cycle management

    Hi All, Kindly send me some help or guide to work on sap r/3 campus management and ppts if any plz dont send from google. Regards, rahull

  • Pen Tool & Paths-

    Hello Photoshopers, There is this really nice Harley-Davidson (actually, what Harley-Davidson isn't nice?!)- I've been using the pen tool for almost a month now- I'm actually getting pretty good with it now, mainly using it to make my selections more

  • Sales order costestimate

    hi sir, i have done basic setting that requirement class and type, a/c assignment,finding requirement type through mrp group,and assigned strategy group in material master. i have take costing variant - sales order cost estimate while entering co08,

  • Reset the Play Count?

    I can't figure out how to reset the play count in itunes