How to communicate from java to excel?

I need to pass data from java to excel such that it'll create a report.
It should be able to handle images also. ie.
I have a form which contains some data.
I need to read the data from the form and export the data - in the same format in the form - to MSexcel. I should be able to put the data in specific cells of MSexcel.
Please help.

example:
out.print("Line1");
out.print(",col2");
out.print(",col3");
out.println("");
out.print("col1 - line2");
...

Similar Messages

  • How to connect from java without using oracle client installation

    hi ,
    Please tell me how to connect from java without using oracle client
    Thanks & Regars

    http://www.orafaq.com/wiki/JDBC#Thin_driver

  • How to communicate from sap to lotus notes

    Hi All,
    Can anybody give an idea how to communicate from sap to Lotus notes and get back the data from Lotus Notes?
    Highly appreciated  if any one give me a documentation or sample scenario.
    Thanks in advance for your help.
    Suresh.

    Hi Suresh,
    You can use FM
    SO_NEW_DOCUMENT_ATT_SEND_API1
    or
    LOTUS123_OLE_STANDARD_DAT
    Using the FM you can send the Mail throught ABAP Program.
    Please Find the Below Link..
    [Lotus Notes|" To send email to Lotus notes"]
    [Lotus Notes|Send Emails Through Lotus Notes]
    Hope they are helpful to you
    Thanks
    Kalyan

  • How to convert from java.lang.Integer to int

    Could you please show me
    how to convert from java.lang.Integer to int?
    and how to convert from java.lang.Integer to String?
    Thanks,
    Minh

    Could you please show me
    how to convert from java.lang.Integer to int?
    and how to convert from java.lang.Integer to String?Tip: always keep a browser open on the API docs; if you've got a
    couple of MBs to spare, download the docs; it's very convenient.
    kind regards,
    Jos

  • Writing data from Java to Excel

    Hi,
    I am trying to writhe data from Java to an Excel Sheet by using JACOB.
    This is my code :
    import java.util.*;
    import java.io.*;
    //import cost.util.*;
    import com.jacob.com.*;
    import com.jacob.activeX.*;
    class XLStock
         public static void main(String argv[])
              XLStock xls = new XLStock();
              xls.main2(argv);
         public void main2(String argv[])
              System.setSecurityManager(null);
              System.runFinalizersOnExit(true);
              Vector v = new Vector();
              XLSPutItem pi;
              String sheetfile = null;
              ActiveXComponent xl;
              Object xlo=null;
              Object workbooks;
              Object workbook;
              Object sheets;
              Variant vOptn = new Variant();
              vOptn.noParam();
              try
                   xl = new ActiveXComponent("Excel.Application");
                   xlo = xl.getObject();
                   Dispatch.put(xlo, "Visible", new Variant(true));
                   xl.setProperty("Visible", new Variant(true));
                   workbooks = xl.getProperty("Workbooks").toDispatch();
                   Variant vTemp = new Variant(argv[0]);
                   workbook = Dispatch.invoke(workbooks, "Open", Dispatch.Method,
                        new Variant[] {vTemp, vOptn, vOptn, vOptn, vOptn, vOptn, vOptn, vOptn, vOptn, vOptn, vOptn, vOptn, vOptn},
                        new int[1]).toDispatch();
                   sheets = Dispatch.get(workbook,"Sheets").toDispatch();
                   pi = new XLSPutItem();
                   if (pi.Parse("1:A1;ciao;6"))
                        v.addElement(pi);
                   for (int i=0; i<v.size(); i++)
                        pi = (XLSPutItem)v.elementAt(i);
                        pi.sheet = Dispatch.invoke(sheets, "Item", Dispatch.Get, new Object[] {new Variant(pi.sheetNumber)}, new int[1]).toDispatch();
                        pi.cell = Dispatch.invoke(pi.sheet, "Range", Dispatch.Get, new Object[] {pi.cellName}, new int[1]).toDispatch();
              catch (Exception e)
                   e.printStackTrace();
              pi = (XLSPutItem)v.firstElement();
              Dispatch.put(pi.cell, "Value", "ciao");
    What happen is that my code always fail at this line :
    xl = new ActiveXComponent("Excel.Application");
    whit this error :
    C:\VJWorks\JNI\jxls>java jxls.XLStock
    com.jacob.com.ComFailException: Can't co-create object
    at com.jacob.com.Dispatch.createInstance(Native Method)
    at com.jacob.com.Dispatch.<init>(Dispatch.java)
    at com.jacob.activeX.ActiveXComponent.<init>(ActiveXComponent.java)
    at jxls.XLStock.main2(XLStock.java:53)
    at jxls.XLStock.main(XLStock.java:28)
    Exception in thread "main" java.util.NoSuchElementException
    at java.util.Vector.firstElement(Vector.java:450)
    at jxls.XLStock.main2(XLStock.java:79)
    at jxls.XLStock.main(XLStock.java:28)
    I task that something is wrong in my system configuration.
    I work on a Win2000 platform and Office 97.
    Someone knows the reason of this error and can suggest what to make.
    Thanks in advance.
    Antonio M.

    Antonio, maybe you can post this back to the Jacob list. As an alternative to Jacob, what about Apache POI or writing the data as comma-delimited and opening the file using Runtime?
    Hope that may help.
    Good luck.

  • How to check from code in Excel Addin that Excel is embedded in Microsoft word

    We've developed an Excel Addin in C# for Excel 2010 and it works perfectly OK. But one issue is reported very recently as below.
    1. Microsoft word document is created with an embedded excel work sheet.
    2. Save the document and close.
    3. Open the word document and try to edit the work sheet there.
    4. Following error comes.
    "The program used to create this object is Excel. That program is either not installed on your computer or it is not responding.
    To edit this object, install Excel or ensure that any dialog boxes in Excel are closed."
    5. This is because, our Addin is initialized and one excel process is running.
    6. If the Excel Addin is disabled, above work flow works correctly.
    Please let me know how to determine from the Excel Addin that the excel worksheet is embedded in another applicatoin. Because I want to disable the Addin in those cases and enable it if the Excel is opened standalone. The Addin is developed in C#.

    Hi,
    Since the error message, please try to install this Hotfix test if it works:
    http://support.microsoft.com/kb/2596494
    Note: Delete the Excel instance running in the background(Go to your task manager and delete it) before opening your Word document and edit your embedded Excel.
    If the issue still exists, please see the article and try the solution which I copied here:
    "The basic simple answer is to place a Marshal.ComReleaseObject(Wb) at the end (or better, in the Finally block) of your event handlers. This will properly allow Word and excel to handle the OLE communication by not having VSTO hang on to an instance
    handle of the workbook, therefore causing the error.
    And this is not carte blanche to start placing ComReleaseObject() all over your code. I have found VERY VERY few limited cases where using ComReleaseObject() in an add-in necessary. And this is one of them."
    http://davecra.com/2012/10/09/vsto-and-comole/
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    Regards,
    George Zhao
    TechNet Community Support

  • Extract data from Java to Excel

    Apologies for my ignorance in this field but is it possible to extract data from a Java based application (stock charts and the like) directly into Excel? If so could someone please contact me and explain the process in very simple terms as i have no idea how Java works :o)
    Many thanks.
    Gilsey

    Actually I should qualify my "Yes" answer. It is possible for a Java application to output data to Excel (using Jakarta POI for example). Whether it is possible to persuade an existing Java application to do that depends on the application. If it has been programmed to do it, then yes. Or if it has an underlying database where it stores its data, and you have access to that database, it might be possible to extract data from the database into Excel. Otherwise the programming of the application would have to be changed.

  • CSV from Java to Excel

    Hi all,
    Maybe you can help me? I am using the following line from a Java app
    LogWriter.write(TimerFmt.format(d)+ s +"," + p +"\n");
    to write to an Excel file - soon far so good.
    Do any body know how I can get TimerFmt.format(d) + s + p to print to separate columns.
    All assistance very much appreciated

    Hi PK
    I am sending in two String vars in the method
    log.writeLog(n,b);
    To a logger class
    class Logger
    private FileWriter fwrLogWriter;
    private File fleLogFile;
    The method that recieves them is
    public synchronized void writeLog(String s, String p, )throws IOException {
    Within this method I add a Timestamp and then write out to an Excel file with the method
    fwrLogWriter.write( s +',' + p +"\n");
    fwrLogWriter.flush();
    Do I need to put in some type separator in the .write()?
    Thanks
    DC

  • Urgent : Communicate from JAVA Applet to Oracle Forms

    Hi All,
    I have developed swing applet. Through this applet I need to start the Oracle Forms on web and access it as well. Is there a way to to this. In this case, Oracle Form is using Global Variables, and the requirement is to set these from my swing applet.

    Many thnx Frank.
    Still little confused. I am J2EE guys and hardly have any understanding on Oracle Forms. I am explaining the requirement in detail so as to you can get an insight into my issue.
    We have a developed a swing Applet, which would be access on web. We have received Oracle Forms from the client, and this has been installed on Oracle10gAS. Our application is installed on the same server. Once user starts interactions with the applet, it will be session based. Also the applet is running at the client end and the form would open at the client end as well. So how is this singleton going to benefit it.
    If the singleton in placed at the server end, how would be maintain the session?
    Can the solution you are mentioning, used in some way to implement SSO, although the login will be done through the applet?
    I am sorry to be a trouble, but if can possibly provide some code snippet, it would be of immense help.
    Thnx a million!
    Regards,
    Rajiv

  • How to export from ALV to Excel

    Hi Pals
    I did a alv grid program using classes, but I am unable to export that alv report to excel or some other tools, even though the button in the toolbar it is an active mode. If I click on that it showing empty spreadsheet.
    Please can you help me out as soon as possible.
    Regards
    Praveen

    Hi Praveen,
    Chk out this function module CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
    (used to Display a File_Open_Dialog For the User to choose a dest. file)
    put this accordingly
    AT USER-COMMAND.
      CASE SY-UCOMM.
        WHEN 'DOWNLOAD'.
    perform CL_GUI_FRONTEND.
    IF SY-SUBRC = 0.
    *--- Perform to download the report into an Excel file
         PERFORM DOWNLOAD_REPORT_XL.
    *--- Perform to write the details report
            PERFORM WRITE_REPORT_INTO_XL.
    Hope this would wrk out.
    If you consider this as the right solution please reward points.
    Regards,
    Harini

  • I am getting a communicat from Java Script that: exc in ev handl Type Error: brw is undefined, Can you help me? Thank you. I don't know what to do.

    Exc in ev handl: TypeError: brw is undefined. Problem.

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • How to establish a connection from java to SAP Netwevare server

    Hi All,
    As per my requirement i need to create a connection from Java to SAP Netwevaer Server inorder to access the docs from KM. PLZ provide some sample code
    (I know how to connect from java to SAP R/3 syatem using JCo connector).
    Can anybody help me.
    ADV Thanks

    Look
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/6615ea90-0201-0010-be81-e7a300fdf212
    /people/rohit.radhakrishnan/blog/2005/05/27/uploading-files-to-km-repository-using-webdynpro-apis

  • Executing a DDL statement from java code

    Hi all,
    this is code from jdev11.1.1.3 version. I am trying to execute a DDL statement in oracle db from java code, but "ORA-00900: invalid SQL statement" error is coming.
    I am trying to create a table in same schema in same db by using 'Copy' command.
    Same DDL command is executing from sql command prompt & table is being created. Plz help me , as how to do from java?
            public String cmb_action() {
            // Add event code here...
            try {
                //getting source db connection
                InitialContext initialContext = new InitialContext();
                DataSource ds = (DataSource) initialContext.lookup("java:comp/env/jdbc/SourceConnDS");
                Connection sourceconn = ds.getConnection();
                sourceconn.setAutoCommit(false);
                String sql = "Copy from myschema/mypass@DB insert t_dept using select * from dept;"                       
                Statement stat = sourceconn.createStatement();
                stat.executeUpdate(sql);
                sourceconn.commit();
                System.out.println("done");
              catch (Exception ne) {
                // TODO: Add catch code
                ne.printStackTrace();
            return null;
        }

    I have a requirement to transfer data from one db to another db from Java Application Layer.Maybe, maye not. We get all sorts of weird "requirements" - which are nothing but thoughts or proposed solutions.
    But,
    Did the "requirement" mention whether the table existed already or not in the target database? - If not, did it tell you to create it - drop/create it?
    Did the "requirement" deliver some explanation to why this copying was neeeded? - Are we talking replication? - Or a one time cloning?
    Etc, etc,
    Personally I would always argue against a "reuirement" like that. - It just isn't the way to do it. Period.
    Regards
    Peter
    P.S: If you are satisfied with what COPY does, then you could let Java make an OS call and do it from there?

  • Communicate from one bounded task flow to another bounded task flow

    Hi All can someone let me know how to communicate from one bounded task flow to another bounded task flow.

    Hi,
    you use contextual events to communicate from one region to another. Have a look here:
    http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/web_adv.htm#CACJBFGI
    Also keep an eye on
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adfinsider-093342.html
    At the end of this week or beginning of next week I am recording a sample for this
    Frank

  • How to Excel,dbf file from java

    hi,
    how to create dbf file and Excel file in java

    File f = new File("myfile.xls"); :p
    I don't know what dbf is, but there are APIs to create Excel files, like Apache POI. Google is your friend.

Maybe you are looking for

  • Question about Photoshop Elements 11, Windows 8, and new Dell Computer

    Since I bought a new Dell Inspirion 660 computer, running Windows 8, my Photoshop Elements 11 occassionally gives me an error message saying I cannot save the file because I do not have enough RAM.  I have 8GB of RAM.  I never had this problem on my

  • No sound on windows Media Pla

    Hi, I have the Sound Blaster Audigy 4 card and have recently installed vista.At first I had no sound at all then I installed the beta2 drivers. This restored sound albeit to a very basic level.At first I could play music via windows media player and

  • How to parse a string containing xml data

    Hi, Is it possible to parse a string containing xml data into a array list? my string contains xml data as <blood_group>      <choice id ='1' value='A +ve'/>      <choice id ='2' value='B +ve'/>          <choice id ='3' value='O +ve'/> </blood_group>

  • PDF not rendering using af:region and doclibdocumentviewer

    Hi all, I have a problem with my PDF document on the UCM that is not rendering 80% of the time. <af:region value="#{bindings.doclibdocumentviewer1.regionModel}" id="pdf_viewer"/> I have the error code below: Error Code: 942 Call: SELECT ACTIVITY_OBJE

  • LMS 4.2 email notifications for node down

    I need help configuring an email alert so that when a node (switch, router, etc) is unreachable, i will recieve an email notification.  So far i have tried creating an event set then notification group and then email subscription.  This does not seem