Java API for reading/writing word/excell file

Hello Friends,
Is there any Java API available for Microsoft word and excell product?

Hi,
Start your search here
http://jakarta.apache.org/poi

Similar Messages

  • API FOR READING MICROSOFT WORD DOCUMENT FILE

    HELLO
    I need to know are there any api's to read a word document i.e a .doc file into a java program. If there r api where can i find them & how can i use them

    For Reading PDF documents, you can use PDFBox, for reading word documents, Apache's POI . But POI supports only Excel right now, Word will soon be supported

  • TIFF-VIs for reading/writing from/to files

    To whom it may concern,
    I'm looking for TIFF-VIs for reading/writing from/to files
    for Labview 6 without any add-on package.
    Unfortunately I can't use TiffRd04 and TiffSv05 from
    Koji Ohashi due to the different file format!
    Any hints?
    Thank you in advance. Best regards from Germany
    Udo Weik

    Hi Udo,
    did you check these TIFF related libraries? .. maybe one of them is working.
    Good Luck

  • Java API for reading Excel Files.

    Hi,
    Can you please suggest me any api for reading excel files.
    Right now i am using jxl.jar for this purpose but i am searching for an open source java api better than this.
    Whether POI gives better than this ?
    Thanks,
    Amit Shah.

    Can you please suggest me any api for reading excel
    files.
    Right now i am using jxl.jar for this purpose
    but i am searching for an open source java api better
    than this.
    Whether POI gives better than this ?i don't know about jxl but poi has several features which an excel can contain and it has been vastly improved in the past few versions.

  • Permissions to external Jar for reading-writing on a file

    hi all,
    I explain my situation.
    I ' ve made an open source project similar to plpdf using jasper report libraries and others.
    My project, which works perfectly in a java jre, have some problems in Oracle Aurora jvm.
    I use the Reflection technique to load the classes from their libraries.
    For this i use this class :
    {color:#993300}<strong>import java.io.File;
    import java.io.IOException;
    import java.lang.reflect.Constructor;
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.net.URLClassLoader;
    * @author g.veltro
    public class Utility {
    public final static ClassLoader sysloader = ClassLoader.getSystemClassLoader();
    public static Object createIstance (Class classe,Object [] parameters,Class [] parametersClasses) throws InstantiationException, IllegalAccessException, NoSuchMethodException, IllegalArgumentException, InvocationTargetException{
    Constructor cons = classe.getConstructor(parametersClasses);
    return cons.newInstance(parameters);
    public static Object executeMethod(Object obj,Class objClass,String methodName,Object [] parameters,Class [] parametersClasses) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException {
    Method method = objClass.getDeclaredMethod(methodName,parametersClasses);
    method.setAccessible(true);
    return method.invoke(obj, parameters);
    public static void addJarLibrary(String s) throws MalformedURLException, IOException{ <br /><br />addJarLibrary(new File(s)); <br /><br />}
    public static void addJarLibrary(File f) throws MalformedURLException, IOException{ <br /><br />addJarLibrary(f.toURI().toURL()); <br /><br />}
    public static void addJarLibrary(URL url) throws IOException{
    URLClassLoader urlsysloader = null;
    urlsysloader = (URLClassLoader) sysloader;
    try { <br /><br />executeMethod(urlsysloader,URLClassLoader.class,"addURL",new Object[]url,new Class[]{URL.class});
    } catch (Throwable t) { <br /><br />t.printStackTrace(); <br /><br />throw new IOException("Error, could not add "+url.getPath()+" to system classloader");<br /><br />}
    public static void addJarLibraries(String libDir) throws IOException {
    File directory = null;
    directory = new File(libDir);
    if(directory.isDirectory()){
    JarFilter filter = new JarFilter();
    File[] jarLibraries = directory.listFiles(filter);
    for(int i=0;i&lt;jarLibraries.length;i++){ <br /><br />addJarLibrary(jarLibraries</strong>{color}<em>{color:#993300}<strong>);
    } else { <br /><br />throw new IOException(libDir+" is not a Directory !"); <br /><br />}
    </strong>{color}
    I gave all the permissions as dba to allow java to access files, etc. etc
    {color:#993300}<strong>Begin
    dbms_java.grant_permission( 'NEOGEO', 'SYS:java.lang.RuntimePermission', 'accessDeclaredMembers', '' );
    dbms_java.grant_permission( 'NEOGEO', 'SYS:java.lang.reflect.ReflectPermission', 'suppressAccessChecks', '' );
    end;
    </strong>{color}
    Then when I try to call a class library that attempts to access a file residing in the file-system i recive an exception.
    This is an example of code that call a class and execute one methods.
    {color:#993300}<strong>public static Object compileJrxml(String path_file_jrxml) throws ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException {
    Object jReport = null;
    Object jCompileManager = null;
    Class jcmClass = null;
    Object [] params = {path_file_jrxml};
    Class [] paramsClasses = {String.class};
    jcmClass = Class.forName("net.sf.jasperreports.engine.JasperCompileManager",true,org.Reflection.Utility.sysloader);
    jCompileManager = jcmClass.newInstance();
    // compilazione del report
    jReport = Utility.executeMethod(jCompileManager,jcmClass,"compileReport",params,paramsClasses);
    return jReport;
    </strong>{color}
    this is the exception :
    {color:#993300}<strong>java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)
    at java.lang.reflect.Method.invoke(Method.java)
    at org.Reflection.Utility.executeMethod(Utility.java)
    at org.EngineReport.ReportControl.compileJrxml(ReportControl.java:44)
    at org.EngineReport.ReportOracle.getReportByte(ReportOracle.java:130)
    at org.EngineReport.ReportOracle.ReportAsBlob(ReportOracle.java:69)
    at org.EngineReport.ReportOracle.ReportAsBlob(ReportOracle.java:49)
    Caused by: java.security.AccessControlException: the Permission (java.io.FilePermission /home/neogeo/Java_Resources.jrxml read) has not been granted to ProtectionDomain (file:/home/neogeo/lib/jasperreports-3.0.0.jar &lt;no signer certificates&gt;)
    AppClassLoader: file:/home/neogeo/lib/xml-apis.jar file:/home/neogeo/lib/jpa.jar file:/home/neogeo/lib/jdt-compiler-3.1.1.jar file:/home/neogeo/lib/png-encoder-1.5.jar file:/home/neogeo/lib/ant-1.5.1.jar file:/home/neogeo/lib/jaxen-1.1.1.jar file:/home/neogeo/lib/mondrian-2.3.2.8944.jar file:/home/neogeo/lib/commons-javaflow-20060411.jar file:/home/neogeo/lib/batik-bridge.jar file:/home/neogeo/lib/antlr-2.7.5.jar file:/home/neogeo/lib/batik-parser.jar file:/home/neogeo/lib/hibernate3.jar file:/home/neogeo/lib/batik-ext.jar file:/home/neogeo/lib/commons-logging-1.0.2.jar file:/home/neogeo/lib/jasperreports-3.0.0.jar file:/home/neogeo/lib/batik-svggen.jar file:/home/neogeo/lib/batik-xml.jar file:/home/neogeo/lib/xml-apis-ext.jar file:/home/neogeo/lib/batik-dom.jar file:/home/neogeo/lib/jakarta-bcel-20050813.jar file:/home/neogeo/lib/servlet.jar file:/home/neogeo/lib/hsqldb-1.7.1.jar file:/home/neogeo/lib/batik-gvt.jar file:/home/neogeo/lib/batik-svg-dom.jar file:/home/neogeo/lib/jxl-2.6.jar file:/home/neogeo/lib/groovy-all-1.5.5.jar file:/home/neogeo/lib/xercesImpl.jar file:/home/neogeo/lib/batik-awt-util.jar file:/home/neogeo/lib/bsh-2.0b4.jar file:/home/neogeo/lib/commons-digester-1.7.jar file:/home/neogeo/lib/batik-css.jar file:/home/neogeo/lib/commons-logging-api-1.0.2.jar file:/home/neogeo/lib/jfreechart-1.0.0.jar file:/home/neogeo/lib/itext-1.3.1.jar file:/home/neogeo/lib/poi-3.0.1-FINAL-20070705.jar file:/home/neogeo/lib/batik-util.jar file:/home/neogeo/lib/commons-beanutils-1.7.jar file:/home/neogeo/lib/jcommon-1.0.0.jar file:/home/neogeo/lib/saaj-api-1.3.jar file:/home/neogeo/lib/batik-script.jar file:/home/neogeo/lib/xalan.jar file:/home/neogeo/lib/batik-anim.jar file:/home/neogeo/lib/commons-collections-2.1.jar
    &lt;no principals&gt;
    java.security.Permissions@1aebb385 (
    (java.io.FilePermission /home/neogeo/lib/jasperreports-3.0.0.jar read)
    (java.util.PropertyPermission user.language write)
    (java.util.PropertyPermission * read)
    (java.lang.RuntimePermission modifyThreadGroup)
    (java.lang.RuntimePermission createSecurityManager)
    (java.lang.RuntimePermission modifyThread)
    (java.lang.RuntimePermission preferences)
    (java.lang.RuntimePermission exitVM)
    (oracle.aurora.security.JServerPermission LoadClassInPackage.*)
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java)
    at java.security.AccessController.checkPermission(AccessController.java)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java)
    at oracle.aurora.rdbms.SecurityManagerImpl.checkPermission(SecurityManagerImpl.java)
    at java.lang.SecurityManager.checkRead(SecurityManager.java)
    at java.io.FileInputStream.&lt;init&gt;(FileInputStream.java)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:167)
    at net.sf.jasperreports.engine.xml.JRXmlLoader.load(JRXmlLoader.java:152)
    at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:150)
    ... 9 more
    </strong>{color}
    The problem i think is that i have to give the permission for input and output on files to an external jar-library .
    I don't know how i can resolve this problem ....
    Do you have any suggestions? </em>

    Hi,
    the problem with grant_permission is, that this can be done for a schema or a role - not for a ProtectionDomain as you need.
    Some on this forum claim that it is possible to control the SecurityManager by the java.policy file in OH/javavm/lib/security. You should try to put something like this in this file (create it if it doesn’t exist)
    grant codeBase "file:/<your codebase>" {
    permission java.security.<your privilege>;
    Unfortunately this doesn't worked for me in 11.1.0.6.0.
    What you could try if you don't find other solution is to extend or write your own (not recommended) SecurityManager.
    see http://download.oracle.com/docs/cd/B28359_01/java.111/b31225/chten.htm#BABJBJGE
    To simple see if your application runs without security you can try the NullSecurityManager.
    see http://java.sun.com/developer/onlineTraining/Security/Fundamentals/magercises/SecurityManager/help.html
    compile and load the class in your schema and activate it with
    System.setSecurityManager(new NullSecurityManager());
    This is for sure not a solution for a productive system.
    HTH
    Jaromir D.B. Nemec

  • Looking for pure Java API to read metadata from an MP4 file.

    Hi, I am looking for a pure Java api that can read MP4 metadata. I have been trying to look online for one but have not found anything
    suitable. If there are no good api's, can someone point me to resources on how to parse metadata from an MP4, tutorials would be great
    as well. I have looked online for that as well but have not found much. Any help would be greatly appreciated.

    Cross posted
    http://www.java-forums.org/new-java/59652-looking-pure-java-api-read-metadata-mp4-file.html
    http://www.coderanch.com/t/580833/Streams/java/Looking-pure-Java-API-read
    http://stackoverflow.com/questions/10568588/looking-for-pure-java-api-to-read-metadata-from-an-mp4-file
    db

  • Java API for running entire ".sql" files on a remote DB ( mySQL or Oracle)?

    Hi,
    Would anyone happen to know if there's a java API for executing entire ".sql" files (containing several different SQL commands), on a remote database server ?
    It's enough if the API works with MySQL and/or Oracle.
    Just to demonstrate what i'm looking for:
    Suppose you've created sql file "c:/test.sql" with several script lines:
    -- test.sql:
    insert into TABLE1 values(3,3);
    insert into TABLE1 values(5,5);
    create table TABLE2 (name VARCHER) ENGINE innoDB; -- MYSQL specific
    Then the java API should look something like:
    // Dummy java code:
    String driver="com.mysql.jdbc.Driver";
    String url= "jdbc:mysql://localhost:3306/myDb";
    SomeAPI.executeScriptFile( "c:/test.sql", driver, url);
    Thanks.

    No such a API, but it's easy to parse all sqls in a file, then run those command:
    For instance:
    import java.sql.*;
    import java.util.Properties;
    /* A demo show how to load some sql statements. */
    public class testSQL {
    private final static Object[] getSQLStatements(java.util.Vector v) {
    Object[] statements = new Object[v.size()];
    Object temp;
    for (int i = 0; i < v.size(); i++) {
    temp = v.elementAt(i);
    if (temp instanceof java.util.Vector)
    statements[i] = getSQLStatements( (java.util.Vector) temp);
    else
    statements[i] = temp;
    return statements;
    public final static Object[] getSQLStatements(String sqlFile) throws java.
    io.IOException {
    java.util.Vector v = new java.util.Vector(1000);
    try {
    java.io.BufferedReader br = new java.io.BufferedReader(new java.io.
    FileReader(sqlFile));
    java.util.Vector batchs = new java.util.Vector(10);
    String temp;
    while ( (temp = br.readLine()) != null) {
    temp = temp.trim();
    if (temp.length() == 0)
    continue;
    switch (temp.charAt(0)) {
    case '*':
    case '"':
    case '\'':
    // System.out.println(temp);
    break; //Ignore any line which begin with the above character
    case '#': //Used to begin a new sql statement
    if (batchs.size() > 0) {
    v.addElement(getSQLStatements(batchs));
    batchs.removeAllElements();
    break;
    case 'S':
    case 's':
    case '?':
    if (batchs.size() > 0) {
    v.addElement(getSQLStatements(batchs));
    batchs.removeAllElements();
    v.addElement(temp);
    break;
    case '!': //Use it to get a large number of simple update statements
    if (batchs.size() > 0) {
    v.addElement(getSQLStatements(batchs));
    batchs.removeAllElements();
    String part1 = temp.substring(1);
    String part2 = br.readLine();
    for (int i = -2890; i < 1388; i += 39)
    batchs.addElement(part1 + i + part2);
    for (int i = 1890; i < 2388; i += 53) {
    batchs.addElement(part1 + i + part2);
    batchs.addElement(part1 + i + part2);
    for (int i = 4320; i > 4268; i--) {
    batchs.addElement(part1 + i + part2);
    batchs.addElement(part1 + i + part2);
    for (int i = 9389; i > 7388; i -= 83)
    batchs.addElement(part1 + i + part2);
    v.addElement(getSQLStatements(batchs));
    batchs.removeAllElements();
    break;
    default:
    batchs.addElement(temp);
    break;
    if (batchs.size() > 0) {
    v.addElement(getSQLStatements(batchs));
    batchs.removeAllElements();
    br.close();
    br = null;
    catch (java.io.FileNotFoundException fnfe) {
    v.addElement(sqlFile); //sqlFile is a sql command, not a file Name
    Object[] statements = new Object[v.size()];
    for (int i = 0; i < v.size(); i++)
    statements[i] = v.elementAt(i);
    return statements;
    public static void main(String argv[]) {
    try {
    String url;
    Object[] statements;
    switch (argv.length) {
    case 0: //Use it for the simplest test
    case 1:
    url = "jdbc:dbf:/.";
    if (argv.length == 0) {
    statements = new String[1];
    statements[0] = "select * from test";
    else
    statements = argv;
    break;
    case 2:
    url = argv[0];
    statements = getSQLStatements(argv[1]);
    break;
    default:
    throw new Exception(
    "Syntax Error: java testSQL url sqlfile");
    Class.forName("com.hxtt.sql.dbf.DBFDriver").newInstance();
    //Please see Connecting to the Database section of Chapter 2. Installation in Development Document
    Properties properties = new Properties();
    Connection con = DriverManager.getConnection(url, properties);
    Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_READ_ONLY);
    //Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
    // stmt.setMaxRows(0);
    stmt.setFetchSize(10);
    final boolean serializeFlag = false;//A test switch to serialize/deserialize the resultSet
    ResultSet rs;
    for (int i = 0; i < statements.length; i++) {
    if (statements[i] instanceof java.lang.String) {
    String temp = (java.lang.String) statements;
    switch (temp.charAt(0)) {
    case 'S':
    case 's':
    case '?':
    System.out.println(temp);
    rs = stmt.executeQuery(temp);
    if (serializeFlag) {
    // serialize the resultSet
    try {
    java.io.FileOutputStream fileOutputStream = new
    java.io.FileOutputStream("testrs.tmp");
    java.io.ObjectOutputStream
    objectOutputStream = new java.io.
    ObjectOutputStream(fileOutputStream);
    objectOutputStream.writeObject(rs);
    objectOutputStream.flush();
    objectOutputStream.close();
    fileOutputStream.close();
    catch (Exception e) {
    System.out.println(e);
    e.printStackTrace();
    System.exit(1);
    rs.close(); //Let the CONCUR_UPDATABLE resultSet release its open files at once.
    rs = null;
    // deserialize the resultSet
    try {
    java.io.FileInputStream fileInputStream = new
    java.io.FileInputStream("testrs.tmp");
    java.io.ObjectInputStream objectInputStream = new
    java.io.ObjectInputStream(
    fileInputStream);
    rs = (ResultSet) objectInputStream.
    readObject();
    objectInputStream.close();
    fileInputStream.close();
    catch (Exception e) {
    System.out.println(e);
    e.printStackTrace();
    System.exit(1);
    ResultSetMetaData resultSetMetaData = rs.
    getMetaData();
    int iNumCols = resultSetMetaData.getColumnCount();
    for (int j = 1; j <= iNumCols; j++) {
    // System.out.println(resultSetMetaData.getColumnName(j));
    /* System.out.println(resultSetMetaData.getColumnType(j));
    System.out.println(resultSetMetaData.getColumnDisplaySize(j));
    System.out.println(resultSetMetaData.getPrecision(j));
    System.out.println(resultSetMetaData.getScale(j));
    System.out.println(resultSetMetaData.
    getColumnLabel(j)
    + " " +
    resultSetMetaData.getColumnTypeName(j));
    Object colval;
    rs.beforeFirst();
    long ncount = 0;
    while (rs.next()) {
    // System.out.print(rs.rowDeleted()+" ");
    ncount++;
    for (int j = 1; j <= iNumCols; j++) {
    colval = rs.getObject(j);
    System.out.print(colval + " ");
    System.out.println();
    rs.close(); //Let the resultSet release its open tables at once.
    rs = null;
    System.out.println(
    "The total row number of resultset: " + ncount);
    System.out.println();
    break;
    default:
    int updateCount = stmt.executeUpdate(temp);
    System.out.println(temp + " : " + updateCount);
    System.out.println();
    else if (statements[i] instanceof java.lang.Object[]) {
    int[] updateCounts;
    Object[] temp = (java.lang.Object[]) statements[i];
    try {
    for (int j = 0; j < temp.length; j++){
    System.out.println( temp[j]);
    stmt.addBatch( (java.lang.String) temp[j]);
    updateCounts = stmt.executeBatch();
    for (int j = 0; j < temp.length; j++)
    System.out.println((j+1)+":"+temp[j]);
    for (int j = 0; j < updateCounts.length; j++)
    System.out.println((j+1)+":" +updateCounts[j]);
    catch (java.sql.BatchUpdateException e) {
    updateCounts = e.getUpdateCounts();
    for (int j = 0; j < updateCounts.length; j++)
    System.out.println((j+1)+":"+updateCounts[j]);
    java.sql.SQLException sqle = e;
    do {
    System.out.println(sqle.getMessage());
    System.out.println("Error Code:" +
    sqle.getErrorCode());
    System.out.println("SQL State:" + sqle.getSQLState());
    sqle.printStackTrace();
    while ( (sqle = sqle.getNextException()) != null);
    catch (java.sql.SQLException sqle) {
    do {
    System.out.println(sqle.getMessage());
    System.out.println("Error Code:" +
    sqle.getErrorCode());
    System.out.println("SQL State:" + sqle.getSQLState());
    sqle.printStackTrace();
    while ( (sqle = sqle.getNextException()) != null);
    stmt.clearBatch();
    System.out.println();
    stmt.close();
    con.close();
    catch (SQLException sqle) {
    do {
    System.out.println(sqle.getMessage());
    System.out.println("Error Code:" + sqle.getErrorCode());
    System.out.println("SQL State:" + sqle.getSQLState());
    sqle.printStackTrace();
    while ( (sqle = sqle.getNextException()) != null);
    catch (Exception e) {
    System.out.println(e.getMessage());
    e.printStackTrace();

  • Api for reading .cfg files

    Hello everyone,
    Once I saw an api for reading typical .cfg files, in which ## are comments, [xx] are labels... Now I need to use it but I don't remember the api any more.
    Can somebody tell me which class do I have to use?
    Thanks a lot

    Now I need
    to use it but I don't remember the api any more.http://java.sun.com/docs/
    There is nothing that I'm aware of in the api that has the same functionality as MFC GetPrivateProfileString(...)
    You could use a properties files like most other people, otherwise you are going to have to implement it yourself.

  • How do we scan for viruses of uploaded excel file in Web Dynpro for JAVA

    Hi All,
    Please let me know "How do we scan for viruses of uploaded excel file in Web Dynpro for JAVA"
    Regards,
    Ganga.

    Hi ,
    pl go through this note "Integrating a virus scan into SAP applications 817623 "
    SAP Virus Scan Interface
    http://help.sap.com/saphelp_nw2004s/helpdata/en/30/42c13a38b44d5e8d1b140794e8e850/frameset.htm
    Sample Application
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/6e1c4221-0901-0010-63ba-b1f9459d6e74
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f2681486-0a01-0010-8497-c778eac80da5
    Regards
    Ayyappparaj

  • Java API for Adobe Flex(AIR and Browser)

    Hello Community,
    Sometime ago i started the project located at: : http://code.google.com/p/gwt4air/ , wich primary goal was to bring another approach on writing AIR application by providing a Java API for the AIR API. On top of that i added support for PDF and Excel generation using Java.
    I m glad to announce that  the project  will now add support for the Flex Framework
    I wrote a post about it on the main page.
    The Idea behind it is to give Java Developers a more simple way to write Flex Application by leaveraing a swing like API.
    I hope this project will be a good alternative to the MXML+ ActionScript approach and looking for people willing to join the project.
    Regards,
    Alain

    Good question, I'd like to know this myself. 4.5 has a huge number of changes since 4.0.

  • Read data from Excel file and diaplay in Webdynpro

    Hi all,
    I need some help. I have a Excel file with set of  name, phonenumbers . I want to know how to display the data using Webdynpro. Could some one help me. help is appreciated and I promise to award points for right answer.
    Thank you
    Maruti

    <b>Hi
    i can explain you to read data from Excel file
    First You have to download the jxl.jar file. You can get this file from the Below site
    </b><a href="http://www.andykhan.com/jexcelapi/download.html">jexcelapi jar</a>
    It will be in Compressed Fromat So Unzip it to get the Contents
    After Unzipping The File You will get a Folder (jexcelapi/jxl.jar)
    Now in NWDS open web dynpro explorer, Right Click Your Project, a popup menu will appear and in that click Properties
    You will get window displaying your Project Properties
    On Left Side of the window You Will Find "Java Build Path"
    Click That "Java Build Path" and you will get 4 Tabs Showing ( Source,Projects,Libraries,Order and Export)
    Click Libraries Tab
    You will find options many options buttons
    In that click the Button "Add External Jars"
    You will get Window in order to fecth the jxl.jar file from the location you had stored
    After selecting the jxl.jar i will get displayed and click ok
    Now Open Navigator
    Open Your Project
    You will find Lib folder
    Copy the jxl.jar to that lib folder
    Note : You cannot Read the Content from the excel file directly
    First You Have to copy that file to the Server,
    And from the Server you can get the file absolute path
    With the absolute path you can read the contents of the Excel file
    You have to save the Excel file as .xls Format and Not as xlsx format i will not accept that...
    You have Upload the Excel file from the Server Using the File Upload UI Element
    This Coding will extract 3 columns from the Xls File
    Coding
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import jxl.Cell;
    import jxl.Sheet;
    import jxl.Workbook;
    import com.sap.fileupload.wdp.IPrivateFileUpload_View;
    import com.sap.tc.webdynpro.services.sal.datatransport.api.IWDResource;
    public void onActionUpload_File(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionUpload_File(ServerEvent)
        IPrivateFileUpload_View.IContextElement element1 = wdContext.currentContextElement();
        IWDResource resource = element1.getFileResource();
        element1.setFileName(resource.getResourceName());
        element1.setFileExtension(resource.getResourceType().getFileExtension());
        //@@end
    public void onActionUpload_File_in_Server(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionUpload_File_in_Server(ServerEvent)
        InputStream text=null;
        int temp=0;
        try
             File file = new File(wdContext.currentContextElement().getFileResource().getResourceName().toString());
             FileOutputStream op = new FileOutputStream(file);
             if(wdContext.currentContextElement().getFileResource()!=null)
                  text=wdContext.currentContextElement().getFileResource().read(false);
                  while((temp=text.read())!=-1)
                       op.write(temp);                                      
             op.flush();
             op.close();
             path = file.getAbsolutePath();
             wdComponentAPI.getMessageManager().reportSuccess(path);
        catch(Exception e)
             e.printStackTrace();
        //@@end
    public void onActionUpload_Data_into_Table(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionUpload_Data_into_Table(ServerEvent)
        try
              Workbook wb =Workbook.getWorkbook(new File(path));
              Sheet sh = wb.getSheet(0);
              //wdComponentAPI.getMessageManager().reportSuccess("Columns = "+sh.getColumns());
              //wdComponentAPI.getMessageManager().reportSuccess("Rows = "+sh.getRows());
              int columns = sh.getColumns();
              int rows = sh.getRows();
              int i=0;
             for(int j=1;j<=rows;j++)
                       ele=wdContext.nodeTable_Data().createTable_DataElement();
                       Cell c1 = sh.getCell(i,j);
                      ele.setTab_Name(c1.getContents());
                       Cell c2 = sh.getCell(i+1,j);
                       ele.setTab_Degree(c2.getContents());
                          Cell c3 = sh.getCell(i+2,j);
                       ele.setTab_Percentage(c3.getContents());
                       wdContext.nodeTable_Data().addElement(ele);
        catch(Exception ex)
             wdComponentAPI.getMessageManager().reportSuccess(ex.toString());
        //@@end
       * The following code section can be used for any Java code that is
       * not to be visible to other controllers/views or that contains constructs
       * currently not supported directly by Web Dynpro (such as inner classes or
       * member variables etc.). </p>
       * Note: The content of this section is in no way managed/controlled
       * by the Web Dynpro Designtime or the Web Dynpro Runtime.
      //@@begin others
      String path;
      IPrivateFileUpload_View.ITable_DataElement ele;
    //@@end
    Regards
    Chandran S

  • EWS JAVA API for availability is giving only 10 suggested times in a particular day

    I'm using EWS JAVA API for seeing the availability of contacts who had shared their calender with me. Here in the suggested timings, I can able to see only 10 suggested timings even though there can be more than 10 suggested slots. 
    I would like to check is there any limit  on suggested times ? 
    API is also giving quality of timing like "Good", "Excellent" on what basis this is decided ?

    You can specify the maximum number of suggestions per day using the MaximumResultsByDay parameter (http://msdn.microsoft.com/en-us/library/office/aa565641(v=exchg.150).aspx).
    The quality is determined based on how many attendees are available and is influenced by the GoodThreshold:
    http://msdn.microsoft.com/en-us/library/office/aa563485(v=exchg.150).aspx.

  • Procedure for read/write an XML-File using UCCX9

    Hi Team!
    Is there someone who can explain me the procedure of reading/writing an XML-File using Cisco UCCX Rel. 9.0?
    In the last couple of days I did a lot of research on the partner community as well as reading the CRS-Editor-PDFs.
    But I can’t find a solution.
    There are some templates available but they all didn’t seem to work.
    I have two xml-files, both uploaded to “Document Management\en_us\”.
    The script itself is attached to this posting.
    I build that my script according to a sample script I found in the community.
    From my point of view I have configured my script exactly like the sample script.
    But it still doesn’t work.
    I am especially interested in where to store the the appropriate files.
    I would be very happy if there is someone who can explain me, what’s wrong there.
    Many thanks in advance.
    Kind regards
    Michael

    I'm experiencing the same issue [reading XML causes errors that say things from "no such file" to some odd Java exception.] I'm able to use a template XML file and after authenticating a user, transform the template into a proper XML file and then successfully save it to the en_US Doc Repository with updated values.
    However, no matter what I've tried or who I've asked, the READ on the XML file so that I can actually script something that does some routing based on the value of the XML file created in my first script? Ultra fail.
    I've even worked with three separate TAC IPCC engineers who were able to reproduce the issue in their test environment, but they were unable to assist. Eventually, whe pressed, I received this response from the last IPCC engineer.:
    "Hello Brad,
    Yes I know what I provided you with is what you already have achieved and this missing step is precisely what you need: how to setup the script to check the status and value of this XML document and then decide routing according to the state.   But unfortunately this is what I found internally.  The other resources are the ones you already know:  support forums, scripting guides.  The other resource with suggest to customer looking for script assistance is the Cisco Account Manager of your company, they know where to get the resources for such issues.   Then again as I mentioned before on our phone conversation TAC does not support scripting but certainly if I find something else on my side I will let you know for sure."
    I would do ponderous cartwheels of joy if someone who has this working in version 9.x [9.0.2 specifically] could share the deep magic.

  • Java API for Webchannel 7.0

    Hello,
    for the ISA 4.0 we had the API of the java classes. Is there something like this for CRM 7.0.
    Best regards,
    Nils

    Hi Nils,
    Follow below steps.
    Yes you can get it from service market place.
    Follow below steps.
    1) Log in to service market place.
    2) Click on "Download" Tab
    3) On Left side click on SAP Software Distribution Center -->Download > Support Packages and Patches> Entry By Application Group.
    4) On Right side. Support Packages and Patches>SAP Application Components> SAP CRM> SAP CRM 2007> Entry by Component--> CRM Application Server Java
    5) Click on "SAP SHARED JAVA COMPONENTS"
    6) From Below screen click on "Download" tab and Download "SAPSHRJAVxx_x-xxxxxxxx.SCA" file.
    7) Open "SAPSHRJAVxx_x-xxxxxxxx.SCA" file by "WINRAR" and unzip on your local laptop.
    8) After unzip you will get several zip files under folder "BUILDARCHIVES"
    9) Find "crmshrjavadoc" file inside folder "BUILDARCHIVES"
    10) Unzip "crmshrjavadoc" file and you will get "javadoc.ppa" file
    11) Rename "Javadoc.ppa" file to "Javadoc.zip"
    12) Unzip "Javadoc.zip" file which we just rename in step 11.
    13) you will get folder "Docs". This folder contain actual "javadoc.zip" file
    14) Unzip above file and you will get Java API Documents for ISA 5.0 or ISA 6.0 or ISA 7.0 depends on "SAPSHRJAVxx_x-xxxxxxxx.SCA" version and SP level.
    I just got ISA Java Doc by following above steps. It looks 14 step but once you download SCA file it will take only 2-3 minutes.
    I am sure you will get Standard Java API for ISA just like ISA 4.0
    Please let me know if you face any problem.
    Also Visit this ECmmerce 6.0 Java API needed
    Let me know if you face any error or problem.
    Regards.
    Ecommerce Developer.

  • Read a Word/Excel doc and convert to PDF

    Can any one suggest a way or source to read a word/excel document and convert it to an PDF.. using Java
    Thanks,
    Satya

    Parse the Excel document with the Apache POI API and generate a PDF document with the Apache FOP API.

Maybe you are looking for

  • Rule "SQL Server 2012 feature Upgrade" Failed

    I am doing an in-place upgrade of SQL Server 2008 R2 SP2 > SQL Server 2012 SP1, both 64-bit, installed on Windows Server 2008 R2. I ran the SQL Server Upgrade Advisor tool prior to upgrade which reported no issues. The error I am getting is: In the d

  • HP OfficeJet Pro 8000 does not print black

    Hi We bought an HP office pro 8000 printer which we have had in the box in a cupboard for the last 14 months (never been opened), I have finally got around to getting it out of the box ans setting it up, however it does not seem to print black only t

  • Problem with Linksys WRT54GS router? Please help.

    Alright, so I have the WRT54GS, and for the longest time after I bought it, it worked just fine, but I've been experiencing problems lately. We have 2 computers running off the router. One is a wired connection, and mine is wireless, which I'm starti

  • Character Palette no longer works properly

    I use the character palette frequently and it worked beautifully in 10.4.4, especially in Keynote. Now I can not use Math symbols unless I select the symbol font. Before the symbol would appear when I double clicked it in the palette window regardles

  • Manufacturing subcontracting

    Hi Experts, Please suggest me the flow for manufacturing subcontracting. Below is the scenario ( requirement ). Header - Flange, component - plate. 4 operations., 10 - in house - component allocated and issue ( plate ) 20 - subcontracting - CNC drill