XML to microsoft Excel using JAVA

Hello guys and gals,
can anyone tell me how to do this, and I don't want to just make an excel sheet using xml or html tables. You see, I need to:
Get data from Oracle DB, which I've done
make the XML and parse it to get data, which I've done
make the excel sheet(s), don't know how
download the excel file, which I've done
upload the excel file, which I've done
load it into an Oracle DB(8.1) again, don't know how
I was thinking about something on the line of making Excel sheets like iText can make pdf's. Any help is appreciated, thanks,
/Tom

The thing is, I can't use comma,- semi-colon,- tab,- etc. seperated files, because all of these occur in the endless amounts of data I have to put into the excel sheet.
I tried making rules about not allowing people to do this.
End-Users suck, and they don't obey my rules. Besides, if they weren't there making silly demands, who'd dish out at the end of the month?
So I'm basically trying to figure out another solution, but I have to use excel sheets. Until now I've just generated html, and forced the users browser to download them as xls. But this doesn't work with multiple sheets.
Anyone with a solution as to how I can generate excel sheets without x-seperated files or html?
/Thomas

Similar Messages

  • Interaction with Microsoft Word using Java Programming

    writing Text ON TO MICROSOFT WORD USING java Programming Urgently required

    Go throuh jakarta POI(hssf) to do..No! HSSF which stands for Horrible SpreadSheet Format can be used for Excel (spreadsheets as the name suggests). For Word, you would need to lok at HPSF.

  • Convert XML file into DTD using Java

    Hi All,
    I want to do convert the xml file into DTD using Java.
    I read the DOM package but didnt get clear idea.
    Anyone of you have an idea please share the coding with me.
    Any suggestions greatly appreciated.
    Thanks
    Veera

    Hi All,
    I want to do convert the xml file into DTD using Java.
    I read the DOM package but didnt get clear idea.
    Anyone of you have an idea please share the coding with me.
    Any suggestions greatly appreciated.
    Thanks
    Veera

  • Does possible always to run application "Microsoft Excel" using applescript?

    Does possible always to run application "Microsoft Excel" using applescript (as application startup script) like this "tell application "Microsoft Excel"
    set bounds of window 1 to {0, 22, 1440, 2360}
    end tell"?

    Any ideas/solutions about possibility always to run application "Microsoft Excel" with applescript?

  • How to set Password protection in excel using java

    Dear all,
    I have no idea to write a java program that how to set password protection in excel. Please give me some solution using java tools. Thank a lot!
    Regards,
    kzyo

    Dear Bamkin ,
    I used your code and paste it in my program. The error is as the follow:
    Code:
         stmnt = c.createStatement();
                   String query = "select StudentNumber, Email, New_Email_Address from [Sheet1$] where Len(New_Email_Address) > 0";
                   System.out.println(query);
                   rs = stmnt.executeQuery(query);
                   stmnt.executeUpdate("SET PASSWORD=PASSWORD('Test')");
    Error:
    (Remark: Invalid SQL statement)
    java.sql.SQLException: [Microsoft][ODBC Excel Driver] �����I SQL ���q���G�a����'DELETE'�A'INSERT'�A'PROCEDURE'�A'SELECT' �� 'UPDATE' �B
         at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6958)
         at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7115)
         at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3111)
         at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:338)
         at sun.jdbc.odbc.JdbcOdbcStatement.executeUpdate(JdbcOdbcStatement.java:288)
         at hk.gov.edb.util.ExcelHandle.updateNewEmail(ExcelHandle.java:414)
         at hk.gov.edb.core.AppMain.doUpdate(AppMain.java:369)
         at hk.gov.edb.core.AppMain$7.construct(AppMain.java:584)
         at hk.gov.edb.util.SwingWorker$2.run(SwingWorker.java:127)
         at java.lang.Thread.run(Thread.java:595)

  • How to store the data read from excel using java code in Ms access database

    Hi. I wrote a code to read the data from excel. May i know how can i save it to Ms access database using java. Also i have many excels. So i should not connect the database using DSN. So is there any other way to achieve this?

    kramish wrote:
    Im pretty sure that Access does support JDBCNo it does not. It supports ODBC.
    just doing a quick Google came up with some pages:
    http://blog.taragana.com/index.php/archive/access-microsoft-access-database-from-java-using-jdbc-odbc-bridge-sample-code/
    http://www.javaworld.com/javaworld/javaqa/2000-09/03-qa-0922-access.html
    Both articles explains how to use the jdbc-odbc bridge. I think I've seen a pure jdbc driver for access but it wasn't from Microsoft and it wasn't free.
    Kaj

  • Microsoft Excel in Java

    Hi people,
    Can Microsoft Excel be used as a database in Java SE 6?
    Need some referrals and tips for this...
    Regards

    What do I do with the full grown adults with offices, titles and budgets who want me to use Excel as a database, and a data file transfer format, and a host of other unsuitable things?
    You can tell them no but you might as well tell gravity to take the day off.You tell them the truth and don't sugar coat it or tone it down--Excel is a spreadsheet and not a database and never was meant to be one. If they want access to data especially on a shared basis, they have to invest in at least a minimal server situation--this can be a free product and an old workstation or just a DB to use at their desktop. If they have Excel, they probably have Access around there someplace too, and with a few lines of code, their data can be saved in a shared repository instead of collected in a ticking time bomb waiting for an excuse to blow up.
    BTW: I used to consult for one of the larger consulting firms in our state and MS-Business partnered--NOT even MS recommends using Excel as a DB. And I faced your exact problem time and time again. The answer is not to use Excel, but use a DB product. When faced with no guarantees on their development using their choice and continued adamant negative confirmation of the correctness of doing it--they do actually choose to do the right thing. (They just might shoot half of one foot off and drive nails into the wall with their heads for 6 months to 2 years, but eventually they get the idea.)

  • Upload to Excel using Java Bean

    Hi
    My requirement is that to upload the data to an excel sheet from a JTable(JTable is actually a java bean which gets its input from forms) and the user need to be given either to view the excel/save the excel/print the excel in any of the networked printers.
    Please cud someone help me with their inputs.
    Thanks again
    Deepa

    can you send me your code bean and form?
    I have example that i can send you to export to excel using webutil and OLE object.

  • How to convert xml file to xsl using java

    Hi all,
    I have an XML file with which i need to convert(transform) it to an xsl file using java.
    I am new to converting xml file to xslt.Please send me if u have code .
    Thanks in advance
    regards
    Ram

    You seem to be asking the wrong question. An XSL file can be used to transform an XML file, but transforming an XML into an XSL does not make sense. The API for running XSL transforms on the Java platform is described here:
    http://java.sun.com/javase/6/docs/api/javax/xml/transform/package-summary.html

  • Reports Generation in Microsoft Excel using Forms Server

    How can I generate reports in Microsoft Excel from an web-enabled forms application, as using Dynamic Data Exchange invokes Excel on the Application Server? My work-around was to generate the file on the application server, save it ,exit the Excel application and then display the excel document using Web.Show_Document. Though this method is successful, the processing time is very high.
    null

    Use text_io package of developer to write records to excel using OLE
    Thanks
    null

  • Creating reports on Excel using java

    Does anyone have any idea on how to use java in creating reports on excel?
    Tnx in advance.

    1. Create a CSV(comma seperated values) file that can be opened in Excel.
    2. Create an HTML file that can be opened by excel.
    3. Use some COM bridge like: http://danadler.com/jacob/

  • How to convert from xml file to html using java code

    How to convert from xml file to html file using java code

    Get yourself Apache Xalan or Saxon or some XSLT processor
    String styleSheet = "/YourXSLTStylesheet.xsl";
    String dataSource = "/YourXMLDocument.xml";
    InputStream stylesheetSource = TransformMe.class.getResourceAsStream(styleSheet);
    InputStream dataSourceStream = TransformMe.class.getResourceAsStream(dataSource);
    OutputStream transformedOut = new FileOutputStream("filename.html");
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Transformer transformer = tFactory.newTransformer(new StreamSource(stylesheetSource));
    transformer.transform(new StreamSource(dataSourceStream), new StreamResult(transformedOut));You'll also need to learn XSLT if you don't already know that. Here's a good place to start
    http://www.w3schools.com/xsl/

  • How to add dropdown in excel using java?

    First of all sorry for creating new topic... i searched for it but i couldn't get it...
    Guys do you have any idea on how to add drop down in excel using Andy Khan's JExcel API? Or is there any other way?

    Sounds like a question for Andy Khan or the JExcel forum.

  • Creating XML from Relational Tables using java

    I would like to create an XML document by querying relational tables in java
    try {
            connection = getConnection();
            final String qryStr = "select XMLElement( foo, 'bar' ) from dual";
            final OracleXMLQuery qry = new OracleXMLQuery(connection, qryStr);
            final String xmlString = qry.getXMLString();
    I would expect this to give the following result that I get from running the statement in SQL Developer
    select XMLElement( foo, 'bar' ) from dual
    <FOO>bar</FOO>
    Instead I get
    <?xml version = '1.0'?>
    <ERROR>oracle.xml.sql.OracleXMLSQLException: Character ')' is not allowed in an XML tag name.</ERROR>
    Is this the correct way to go about this?

    Is this the correct way to go about this?
    Not really.
    OracleXMLQuery class is the Java-side implementation of DBMS_XMLQUERY APIs.
    It's mostly designed to generate a canonical XML document out of a SQL query.
    Assuming a query like "SELECT col1, col2 FROM my_table", the resulting XML should appear like this :
    <ROWSET>
      <ROW>
        <COL1>123</COL1>
        <COL2>ABC</COL2>
      </ROW>
      <ROW>
        <COL1>456</COL1>
        <COL2>XYZ</COL2>
      </ROW>
    </ROWSET>
    So in your test, since the resulting column is not aliased (XMLElement), you're actually trying to generate something like this :
    <ROWSET>
      <ROW>
        <XMLELEMENT(FOO,'BAR')>
          <FOO>bar</FOO>
        </XMLELEMENT(FOO,'BAR')>
      </ROW>
    <ROWSET>
    which of course is invalid, hence the error message.
    If you want to generate only <FOO>bar</FOO> as output, just use a regular PreparedStatement with your query and access the document in the ResultSet with the proper getter.

  • Payload XML DOM Object Update using Java Embedding

    Hi,
    I have a Java Embedding activity which updates the payload after making
    a call to a local EJB. The EJB sends back updated information. In my Java
    Embedding activity i try to update the payload nodes with the new information.
    It get's really cumbersome to do this sort of thing in BPEL. Basically i am trying
    to remove an existing node in the payload and replace it with a new node.
    I did so may things that i really don't remember what are they. Finally i managed to
    update the payload with the following code.
    org.w3c.dom.Element payload = (org.w3c.dom.Element)getVariableData("inputVariable","payload","/MSG");
    org.w3c.dom.Element oldNode = (org.w3c.dom.Element)getVariableData("inputVariable","payload","/MSG/TSLData");
    org.collaxa.thirdparty.dom4j.Element tslElem = com.collaxa.cube.xml.dom.DOMFactory.convertToCollaxaElement(oldNode);
    oldNode = (org.w3c.dom.Element)getVariableData("inputVariable","payload","/MSG/REC");
    payload.removeChild(oldNode);
    msgElem = com.collaxa.cube.xml.dom.DOMFactory.convertToCollaxaElement(payload);
    msgElem.add(recElem);
    I feel that there no proper interface to update the data in the payload values with
    nodes, string etc. It would be nice if we don't have to work with
    com.collaxa.cube.xml.dom.DOMFactory
    org.collaxa.thirdparty.dom4j.Element
    the collaxa classes.
    We need to have more than setVariableData, bascally good payload manipulation API's.
    Let me know if there are any alternatives to do this.
    Thanks,
    Senthil L

    I have been having the same difficulties. Were you able to find any documentation or javadocs for the Collaxa libraries? If so, I would greatly appreciate locating them.

Maybe you are looking for

  • ITunes 7.1 will not let me play any tracks...

    iTunes 7.1 will not let me play any tracks, it opens up fine and I can do pretty much anything else with it but when I double click or press play on a track an error message comes up and iTunes has to close. This has only been happening since I uploa

  • Warnings in FSCM Credit Management for negative credit check.

    Hello, I am implementing FSCM Credit Management. I have below requirement. At the time of creation of sales order, if credit limit is exceeded then only warnings are required, Sales order should not go in the block (as available in earlier SAP AR Cre

  • Apple Mail - Can't Send - Buttons do not respond

    I have a new mac on the network,I setup a pop3 account in Apple Mail. It received fine but will not send. No errors are reported. When I create a new message and click the send, it doesn't nothing. Same response as if I click save as draft. I have tr

  • Midnight release in store pickup

    I preordered online and selected store pickup for a store that isn't opening at midnight. Can I pick it up at a different store if I have my order number?

  • Shockwave Flash player may be busy....

    So troubled by this product it keeps freezing & halting; well over a year now. So I removed it.Now I can't seem to get it reloaded again; after talking to my provider and finding it's safe. Why????