How to view excel spreadsheet in java

Hello
Is there a way to open an excel spreadsheet in java? I don't mean reading and writing from an excel file, but instead embedding excel in java. For example instead of launching excel using the Desktop class and opening a new excel window, Java would open an instance of excel and add it to Jframe or Jpanel. Sort of like what Eclipse does when you Open a file with In_Place Editor. Google returns results on how to use some windows dll file and using active x control or whatnot.. Was wondering if there is a better and simpler way..
Thank you.

oplead wrote:
Hello
Is there a way to open an excel spreadsheet in java? I don't mean reading and writing from an excel file, but instead embedding excel in java.Ah yes, "embed" is the word you want as your google keyword, not "open". My first try with "embed excel in Java" returned as the first link a page from a company named JIntegra for which this seems to be their main business. Here's the link I found, just for information:
[http://j-integra.intrinsyc.com/support/kb/Article.aspx?id=30421|http://j-integra.intrinsyc.com/support/kb/Article.aspx?id=30421]

Similar Messages

  • Reading Microsoft Excel spreadsheets in Java

    Is it possible to read a Microsoft Excel spreadsheet in Java? If so, how does one do it?

    There exist the JDBC-ODBC bridge driver which enables interaction with Excel files using JDBC, but you're restricted to only one platform (Microsoft Windows), only one (free) driver which is full of bugs and inefficiency (the JDBC-ODBC bridge driver), only one worksheet (the first of the spreadsheet) and only the retrieval of the pure data (no functions, formats, graphs, images, etc).
    Bad idea after all.
    If the sole purpose is to have an embedded database, rather consider JavaDB, Derby or Hypersonic instead of Excel.

  • How to read Excel file in java

    Respected sir/madam
    I want to read the values from Excel file in Java program. How can I do that. When I searched over the net I came to know that you can treat Excel file as a Database and write the code as u write for making DB connections .
    I did that but i am getting the following error ..can anybody please help..
    This is the code what i have written
    import java.io.*;
    import java.sql.*;
    public class ReadExcelFile {
    Connection c;
    Statement stmnt;
    public void checkABA_Number()
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    c = DriverManager.getConnection("jdbc:odbc:ExcelTest","",""); // ExcelTest is the DSN name
    stmnt = c.createStatement();
    ResultSet rs = stmnt.executeQuery("select * from abadata"); // abadata is my Excel file name
    while(rs.next())
    System.out.println(rs.getString(1)+" "+rs.getString(2));
    }catch(Exception e)
    System.out.println(""+e.toString());
    finally
    try
    stmnt.close();
    c.close();
    catch( Exception e )
    System.err.println( e );
    public static void main(String[] args)
    new ReadExcelFile().checkABA_Number();
    My Excel file starts from the first row and first column and also the first row contains the names of the column.
    It give me the following error..
    java.sql.SQLException: [Microsoft][ODBC Excel Driver] The Microsoft Jet database engine could not find the object 'abadata'. Make sure the object exists and that you spell its name and the path name correctly.
    How can I deal with this.?I have properly selected the worksheet while giving the DSN . Is there any versionig problem with Excel or some drivers are in appropriate..and yes i chose Microsoft Excel Driver (.xsl) from ODBC .
    I created System DSN.
    Can anybody please help me with this ? I will be very gratefull for replies
    Thanks in advance

    here is the code to read excel file
    public void readexel(String filename)
    Connection c = null;
    Statement stmnt = null;
    try
    Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
    c = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};DBQ=" + filename);
    stmnt = c.createStatement();
    String query = "Select * from [Sheet1$]" ;
    ResultSet rs = stmnt.executeQuery( query );
    while( rs.next() )
    System.out.println( rs.getString(1) );
    catch( Exception e )
    System.err.println( e );
    }

  • How to view pdf file in java/jsp?

    Hello Everybody,
    Any one help me how to view pdf file in jsp using java application.
    I have pdf file c:\app.pdf.
    How can i display the pdf file.
    Please help me.................
    Thanks

    Hello,
    You can use the below code, but i am not sure how far is this a startard way of doing it.
    # <%
    # ServletOutputStream servletOutputStream = response.getOutputStream();
    # File reportFile = new File("C:\\Tomcat 5.0\\webapps\\TestApp\\myfile.pdf");
    # FileInputStream fis = new FileInputStream(reportFile);
    # byte[] bytes= new byte[128000];
    # int count=fis.read(bytes);
    # try
    # response.setContentType("application/pdf");
    # response.setContentLength(bytes.length);
    # servletOutputStream.write(bytes, 0, bytes.length);
    # servletOutputStream.flush();
    # servletOutputStream.close();
    # }catch(Exception e){}

  • How to use excel api in java?

    I need to use excel api in Java to generate data in excel format. Can any one tell any of the use ful Excel api that we can down load from net? i have read about Apache's POi-hssf-Java api. But the jar i downloaaded from Apache site is not working ? Can anybody please send me the jar for taht Api ?

    Hi,
    In fact i was not clear about whcih jar file to download from the apache site. i found one folder structure like this
    -parent
    -bin
    -src
    All these folders contained some zip files. i took the zip files and extracted them. And i set teh class path also . But when i tried to import in java programs ,these jar files are giving compilation errors

  • How to open Excel spreadsheet in Numbers.

    Hey Kids:
    I have trouble opening imported Excel spreadsheets in Numbers on my iMac.  I have Mountain Lion 10.8.2.  Previously I tried a demo of Office Mac that has expired.  When I try to open an Excel spreadsheet I get a message to buy Office Mac.  I've tried to put the demo application in the trash but I still can't open the Excel spreaddsheet and get a message that Excel is in the trash and can't open the spreadsheet. 
    HELP!

    In addition to what Niel said...
    In the Finder, click on an Excel file (.xls) to select it, press command-I to Get Info.
    In the Info window, expand the Open with...section.
    Click the pop-up menu bar in that section and choose Numbers '09.
    Click the Change All button below the menu.
    Repeat with a current version (.xlsx) file.
    Regards,
    Barry
    PS: Unless you have something vital that you're storing in the Trash, you might also want to Empty the Trash to get rid of the Excel trial that's expired.
    B

  • Downloaded office 365 and associated apps onto ipad mini.  How come some excel spreadsheets will not open?

    Some excel spreadsheets attached to my emails will not open on ipad.  I have the excel app with 365 subscription.

    Can you open them in the mail app itself? If you can't open them in the mail app, my assumption would be that they were not properly saved, named or they are just corrupt file. Files with the .xls or .xlsx extension that are properly formatted Excel files, should open in the mail app without the need for any other app. If you want to save and edit the files, then you need a compatible app in which to save them.

  • How to print  Excel file in java?

    Hi, all
    I had written a program to generate a Report with Excel in java using the jexcelapi_2_5_7 . But I don't know how to print it in java program. It seems that java print Service don�t support Excel flavor. How should I do? It will be a great appreciate for me if anyone could help me.
    Regards
    David

    Hi ,
    i m asking if you got a solution for your problem ;
    i need solution to the same problem
    thx in advance

  • How to lock excel sheets using java

    hi,
    i have developed a web page using JSP which has to open an excel sheet and display the databese information in it.
    but the prblem is the excel sheet has to be locked such tht the clients accessing it can only read the data but not change it.
    can it be done thru programming it in java ?
    kindly help.

    the excel file is client side and JSP is server side
    so how can you access it?
    in other words, your JSP IS NOT opening an excel file, it's only facilitating the upload
    POI from Apache is what we use as well, and it will allow you access to the data AFTER the excel file is transfered to the server

  • How to activate Excel sheet from java

    I need to activate excel sheet from my java program. I'm working on the project "excel tutorial". I want the user to work interactively in the excel workbook just from my java API. But i don't know how to do. please help.

    I need to activate excel sheet from my java program.
    I'm working on the project "excel tutorial". I want
    the user to work interactively in the excel workbook
    just from my java API. But i don't know how to do.
    please help.Voila :-)
    http://www.andykhan.com/jexcelapi/tutorial.html

  • Mbp: how to view excel in attached monitor?!

    I've set up my 13" MBP with a second monitor. I will often type in the browser in the MBP's attached 13" screen, while referring to a browser tab in the attached (second) monitor.
    New apps always open on my MBP's primary (attached) screen. Typically (Chrome, Evernote, iTunes, TextEdit, PowerPoint, Word) I can move an app window from my primary screen to the second monitor, but Excel windows always bump up against the top of my primary screen and refuse to move to the second screen. Yes, I have shutdown and restarted the MBP, and it's not file-specific.
    How do I move Excel sheets to the second screen? Note that Word and PowerPoint behave normally, like every other apps. (This is Office 2008 for Mac.)
    Thanks for helping to solve this mystery.

    Odd. But can't test very well right now cause I'm on Lion and w/Office 2011.
    Try quitting Excel, dragging the com.microsoft.Excel.plist file out of your ~/Library/Preferences folder and doing the test again. That resets Excel's preferences, in case that has something to do with this issue.

  • How to Lock Excel Sheet through Java Code

    Hi
    Iam using Jasper Reports.Iam exporting to Excel.I want to Lock Excel sheet after Export.I need code how to lock and unlock
    TQ

    I guess you need some library that can modify Excel files, like JExcel or Jakarta POI.

  • How to access excel spreadsheet after Lion OS?

    How do I retrieve an excel (.xls) file after updating to Lion? It is grayed out in doc listing.  Thx.

    Locate it in the Finder and open it in Office 2008 or newer, OpenOffice, Numbers, or similar software.
    (87643)

  • How to access excel(macros defined) in Infoview?

    Hi All,
    Can anyone help me out to know how to view Excel with Macros in Infoview.
    Regards,
    Anisa

    Hi,
    So you mean to say, I just need to use the ConnectionManager.getConnection() method. It requires a pool connection name. Do I specify the same pool name as in the connectionmanager.xml config file ? And that will do it ? Please clarify. Following is a code snippet. Please verify if this is correct.
    Connection conn = null;
    try
    conn = ConnectionManager.getConnection(poolname);
    if(conn == null) {
    throw new IOException("No such connection found");
    thanks,
    Mainak

  • Format excel spreadsheet

    Hi
    i would like to know on how to format excel spreadsheet using jexcel API once the program write an excel file i.e.(format column width, fill the cell with color).
    im a newbie in jexcel API.
    could anybody help me?
    thanks in advance.
    Message was edited by:
    lesbon

    These JExcel questions do not belong here.
    They belong somewhere like http://support.teamdev.com/category.jspa?categoryID=14

Maybe you are looking for

  • The difference between 1.1.2 & 1.1.3?

    other then the home screen and its harder to jailbreak...

  • Printing form fields only on Reader

    Before I get to the meat, a little background.  We are in the process of converting all of our forms into PDFs so to keep everything the same across the company.  My company is a contract packager, and we ship out many items.  We have purchased forms

  • Distinct distribution query

    Hi all, I have the next records table example: WITH taba      AS (SELECT 2000 AS id, 'ORDEM' AS name, 'FILEA' AS description FROM DUAL          UNION ALL          SELECT 2000 AS id, 'ORDEM' AS name, 'FILEB' AS description FROM DUAL          UNION ALL

  • How can I take my library from a mac to a windows computer

    I have an old ibook that has all of my songs in it. we recently got a new windows computer in place of that computer. I don't want to loose my songs! How can i move the library?! Is it possible to do it from my ipod?

  • After Update, Safari only loads some pages.

    Hello, On my Powerbook G4 (OS 10.4.11), I recently installed Security Update 2008-008 (PowerPC), and since I've installed it, Safari (v3.2.1) is loading only some pages. This is not just Safari, but Firefox will not load some pages either. Pages that