OfficeControl and POI

I bind OfficeControl's property dataSource with type com.sap.ide.webdynpro.uielementdefinitions.Resource, and can show excel in OfficeControl.
Then I use POI to create a excel and bind it with OfficeControl , but it has errors: ERRO|20080416133953|KHFA.OfficeCompView.OfficeControl_592|CIOS_GeneralDocumentContainer_Acf::|OleLoad|HRESULT=-2147221164(没有注册类别)
CODE:
ByteArrayOutputStream os = new ByteArrayOutputStream();
          HSSFWorkbook wb = new HSSFWorkbook();
          HSSFSheet s = wb.createSheet();
          wb.setSheetName(0, "Matrix");
          for(short i=0; i<50; i++) {
               HSSFRow row = s.createRow(i);
               for(short j=0; j<50; j++) {
                    HSSFCell cell = row.createCell(j);
                    cell.setCellValue(""i","+j);
          try {
               wb.write(os);     
          } catch (IOException e) {
               e.printStackTrace();
          try {
               IWDResource resource = WDResourceFactory.createCachedResource(os.toByteArray(),"name",WDWebResourceType.XLS);
               wdContext.currentContextElement().setResource(resource);
          } catch (Exception e) {
               // TODO Auto-generated catch block
               e.printStackTrace();
Anyone can help me?
Thanks!

Hi, and thanks for the input.
Since by manually exporting an ALV list to XML format, i get the data in the desired XML format, I assume that there already are function modules or classes in the system to do the conversion for me; or is it a wrong assumption?
I'm looking at class CL_SALV_WD_EXPORT_UTIL, which exposes a method to convert ALV to XML format, but i can't seem to understand how to use it; and in a Webdynpro context I can't use anything which is GUI-dependent.
I thought that OfficeControl UI was for "Office Integration", that means there should be a well-defined set of common function, and that i was simply missing how to use them, not that i should learn how to use Microsoft internal XML representation of data.
So, the OfficeControl is intended to provide an IFrame-like embedding to an Office Document with no high-level support?

Similar Messages

  • Problem with reading text from .DOC files through java and POI

    I have used a jar file "poi-scratchpad-3.2-FINAL-20081019.jar" and "poi-3.2-FINAL.jar" to read text from a .DOC file. I used the "getParagraphText()" function of the class "org.apache.poi.hwpf.extractor.WordExtractor" to get the text.
    I am able to get the text in the .DOC file but along with that i am getting the following messages/warnings
    Current policy properties
    *     thread.thread_num_limited: true*
    *     file.write.state: disabled*
    *     net.connect_ex_dom_list:*
    *     mmc.sess_cab_act.block_unsigned: false*
    *     mmc.sess_cab_act.action: validate*
    *     mmc.sess_pe_act.block_blacklisted: false*
    *     mmc.sess_pe_act.block_invalid: true*
    *     jscan.sess_applet_act.stub_out_blocked_applet: true*
    *     file.destructive.in_list:*
    *     jscan.sess_applet_act.block_all: false*
    *     file.write.in_list:*
    *     file.nondestructive.in_list:*
    *     window.num_limited: true*
    *     file.read.state: disabled*
    *     jscan.session.origin_uri: http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/poi/poi/3.2-FINAL/poi-3.2-FINAL.jar*
    *     file.nondestructive.state: disabled*
    *     jscan.session.user_ipaddr: 10.136.64.153*
    *     net.connect_other: false*
    *     thread.thread_num_max: 8*
    *     file.destructive.ex_list:*
    *     file.nondestructive.ex_list:*
    *     file.write.ex_list:*
    *     jscan.sess_applet_act.sig_invalid: block*
    *     file.read.in_list:*
    *     mmc.sess_cab_act.block_invalid: true*
    *     jscan.session.policyname: TU1DIERlZmF1bHQgUG9saWN5*
    *     mmc.sess_pe_act.action: validate*
    *     thread.threadgroup_create: false*
    *     net.connect_in_dom_list:*
    *     net.bind_enable: false*
    *     jscan.sess_applet_act.sig_trusted: pass*
    *     jscan.session.user_name: 10.166.64.201*
    *     jscan.session.user_hostname:*
    *     file.read.ex_list:*
    *     jscan.sess_applet_act.sig_blacklisted: block*
    *     jscan.session.daemon_protocol: http*
    *     net.connect_src: true*
    *     jscan.sess_applet_act.unsigned: instrument*
    *     mmc.sess_pe_act.block_unsigned: false*
    *     file.destructive.state: disabled*
    *     mmc.sess_cab_act.block_blacklisted: true*
    *     window.num_max: 5*
    Below the above messages/warnings the data is getting printed. Only the text part of the data is retrieved not the fonts, styles and bullets etc.
    Can anyone explain me why I am getting above warnings and how can I remove them. Is it possible to fetch the text depending on delimiters.
    Thanks in advance,
    Tiijnar
    Edited by: tiijnar on May 21, 2009 2:45 AM

    The jar files which were used are downloaded from http://jarfinder.com. Those jars created the problem of displaying those messages on console. I downloaded APIs from apache.org and used them in my application. Now my application is running good.
    Tiijnar

  • R12 E-Commerce Gateway. POO and POI sample files?

    Hello!
    Can anybody put here sample files for POO (ORDERS 850) and POI (ORDERS 850)? Just wanna see them. I exported POO file according to the standard settings for file, but I can't to import it (according to the standard settings for file). And this is a little bit strange for me. May be I didn't understand something.

    You can use apps.ece_utilities.verify_flatfile to check on how the application reads the file according to the defined layout and see whan might not be falling on the expected positions.

  • Using JAR file in running application and POI !

    Hi all
    I am trying to use POI HSSF f(for the first time, So pls bear with me!)or creating excel file from my java Application. I am using the jar file :
    poi-2.0-RC2-20040102.jar. Not sure if its the correct one. So If I am wrong pls correct me.
    Now I am creating a bat file to compile my application:
    @echo off
    C:\jdk1.3.1_04\bin\javac -classpath C:\POI\poi-2.0-RC2-20040102.jar MyApp.java
    pauseIt compiles fine. Now If I try to use the jar file in run.bat for running my application, it says NoClassDef FoundError:MyApp. Here is my run.bat
    java -classpath C:\POI\poi-2.0-RC2-20040102.jar MyApp
    pauseI am not able to run my application with this run.bat file . If I change the content to:
    "java MyApp.java"
    It runs but give me error: NOClassDefFoundError:import org.apache.poi.hssf.usermodel.HSSFWorkbook
    Pls suggest me about how to use jar file in running my app and how to rresolve workbook finding problem.
    Reagrds

    Try this:
    java -classpath .;C:\POI\poi-2.0-RC2-20040102.jar MyApp
    pauseNote the "dot semi-colon" at the start of the CLASSPATH. That puts the current directory in the CLASSPATH, which is where MyApp.class lives. (No package, right?)
    See if that works better.

  • TomTom and POI handling ?

    Could anyone tell me how Tomtom handles the POI on the Iphone. i have an PC and Itunes to sync anything. is it posible to download POI (such as my speed camera POI or mc donalds) and install it to my iphone. one my HTC (windows Mobile based) i had done this with windows explorer and copied the POI to the map directory from tomtom.
    anyone tried this installing POI (which ist no service from tomtom itself)?
    greets
    wenrner

    Its easy get a program called Diskaid v 1.1 http://www.soft-files.com/diskaid_41614.html
    I use one of the earlier versions that you dont need to pay for. it does the job fine.
    select the root folder (bottom left of the program)
    then select private/mobile/var/applications/C2CF432A-64F2-4673-BAF7-CF2AE88A7592
    open this folder by clicking on the plus.do the same to australia.app double click australiamap.
    here you can copy the bmp and ov2 files to this directory by clicking copy file to device at the top of diskaid.
    I have just tried this and the poi files show up in tomtom. to see it open tomtom and select map then poi types. the pois that you have copied will automatically be turned on.
    hope this helps. email me if you dont understand anything
    [email protected]
    cheers Bennos0
    Message was edited by: Bennos0
    Message was edited by: Bennos0

  • Can anyone suggest an international GPS nav app that offers map and POI downloads for offline access and route search?

    I'm going to be in the UK with an American phone, don't expect mobile data, and I'd like to use this app instead of the £30 up charge for a rental GPS... I've seen the free Navfree and the cheap as free MotionX Drive, but have read Navfree has some spotty routing and MotionX won't allow regional (or even whole city, ftm) map downloads.

    At $90 for the UK maps this is a too pricey for the use case. In case it wasn't clear, I'm visiting the UK short term so I shouldn't spend more than the £30 to hire a GPS nav system.
    Thanks for the suggestion! Any other ideas?

  • Error reading excel file using POI.

    Hi ,
    I am having some problem when reading the excel file.
    While reading excel file I am getting error-java.io.IOException: Unable to read entire block; 4 bytes read; expected 512 bytes.
    part of my code:-
    InputStream stream = objFormFile.getInputStream();
    POIFSFileSystem fs = new POIFSFileSystem(stream);//getting above error here.
    HSSFWorkbook wb = new HSSFWorkbook(fs);
    Case 1:
    I download the file on the system ,save it ,and then directly upload it to the system ,I get the above error .
    Case 2:
    It works fine if I download the excel and manually open and save it and then upload it .
    I am using JDK1.4.1 and poi-2.5.1-final-20040804.jar.
    Can any one please help me out for the above problem?
    Edited by: hruday on Jul 31, 2008 3:20 AM

    Instead of using POIFSFileSystem, try to directly create the HSSFWorkbook
    InputStream stream = objFormFile.getInputStream();
    //POIFSFileSystem fs = new POIFSFileSystem( stream );//getting above error here.
    HSSFWorkbook wb = new HSSFWorkbook( stream );

  • Exception when using Apache POI in ADF

    Goodmorning;
    i'm using jdev 11g, i m trying to use Apache POI to import the content of Microsoft XL file into my database.
    i already do that succesfully on netbeans. but not on jdev.
    first i download the POI package from the apache web site, and i create a librarie and add the jar files to the jdev by using Tools --> Manage Libraries, this is the list of the jar file : poi-3.6-20091214.jar, poi-contrib-3.6-20091214.jar, poi-ooxml-3.6-3-20091214.jar and poi-scratchpad-3.6-20091214.jar.
    next, create a jsf page with a boutton, then i enable the binding of this page by using Design --> Page Properties --> component binding --> check Auto Bind
    in the action method of the buton i put the following code :
    public String cb1_action() throws FileNotFoundException, IOException {
    Connection conn = null;
    String url = "jdbc:mysql://localhost:3306/";
    String dbName = "test";
    String driver = "com.mysql.jdbc.Driver";
    String username = "root";
    String userPassword = "";
    try {
    InputStream fs = new FileInputStream("/home/Rachid/test1.xls");
    HSSFWorkbook wb = new HSSFWorkbook(fs);
    HSSFSheet sheet = wb.getSheetAt(0);
    HSSFRow row = null;
    for (Iterator rowIt = sheet.rowIterator(); rowIt.hasNext();) {
    row = (HSSFRow) rowIt.next();
    HSSFCell code = row.getCell(0);
    HSSFCell nom = row.getCell(1);
    HSSFCell dt = row.getCell(2);
    java.util.Date date = dt.getDateCellValue();
    System.out.println("code "+code+" % nom "+nom +" % date " +date);
    try {
    Class.forName(driver).newInstance();
    } catch (ClassNotFoundException e) {
    } catch (InstantiationException e) {
    } catch (IllegalAccessException e) {
    try {
    conn = DriverManager.getConnection(url+dbName,username,userPassword);
    } catch (SQLException e) {
    Statement stmt = null;
    try {
    stmt = conn.createStatement();
    } catch (SQLException e) {
    String strQuery = "insert into importxl values ("+code+",'"+nom+"','"+date.getDay()+"/"+date.getMonth()+"/"+date.getYear()+"')";
    System.out.println(strQuery);
    try {
    stmt.close();
    } catch (SQLException e) {
    try {
    conn.close();
    } catch (SQLException e) {
    } catch (FileNotFoundException e) {
    e.printStackTrace();
    } catch (IOException e) {
    e.printStackTrace();
    return null;
    and when i run my page and click on the button, this exception page appear :
    Error 500--Internal Server Error
    javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbook
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: javax.faces.el.EvaluationException: java.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbook
         at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:698)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:285)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         ... 35 more
    Caused by: java.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFWorkbook
         at Mybean.bean1.wrc(bean1.java:23)
         at Mybean.MybeanImport.cb1_action(MybeanImport.java:53)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
         ... 43 more
    Caused by: java.lang.ClassNotFoundException: org.apache.poi.hssf.usermodel.HSSFWorkbook
         at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:280)
         at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:253)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:56)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
         at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:177)
         at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:37)
         ... 52 more

    Hi John,
    Ya ur right i too agree we can go for shared Libraries for reusable or massive apps but we still dont know whether OP is gng on the way and also i never said dont go for shared Libraries+
    May be he will be running the application locally for any testing purpose..... if it so i have suggested him not to keep the jar files in the folders outside the project....
    Why becoz incase the jar file kept in outside folder,
    if the folder gets deleted or some times if it kept in any shared folder and user loses the permission error will be thrown it cant be traced why the error gets throwned....
    if the jar is gng to be referred from local best way is to keep it in the project folder itself.............
    Regards,
    Suganth.G

  • Microsoft Office documents and PDF to HTML converter

    Need framework(if such exists) for this task, or some advices...

    about utility, actually becouse ti's the easiest I think to use it run OpenOffice with Macros, to automate the process(And I frogot to say, that OS is *nix, not Windows, thats why such libs as JACOB doesn't fit, becouse of using dll by them, and POI is row to use), but I still looking for tool or lib(toll would be better :)) to convert PDF to HTML                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Reports with jsp and excel?

    Hello all..
    I'm Struggling with my application when i need reports.. i use jsp and servlets. How can i build reports and load them into a excel spreadsheet?
    PD: i dont have time to work with jasper reports.. :/ so if there's a faster and easier solution please let me know!
    Thanks.

    JExcel and POI are commonly used

  • POI HSLF trouble adding a table to a slide

    got the error when i was trying to execute the code below (slide.addShape(table); ), this is pretty much the example code that i got from
    http://www.java2s.com/Open-Source/Java-Document/Collaboration/poi-3.0.2-beta2/org/apache/poi/hslf/examples/TableDemo.java.htm
    i tried poi-scratchpad-3.5-beta3 and poi-scratchpad-3.1-final.jar, same error
    can anyone please help? thank you
    java.lang.ClassCastException: org.apache.poi.ddf.EscherSpRecord cannot be cast to org.apache.poi.ddf.EscherOptRecord
         at org.apache.poi.hslf.model.Table.afterInsert(Table.java:119)
         at org.apache.poi.hslf.model.Sheet.addShape(Sheet.java:250)
    SlideShow ppt = new SlideShow();
         Slide slide = ppt.createSlide();
         Table table = new Table(1, 1);
         TableCell cell = table.getCell(0, 0);
         cell.setText("TEST");
         slide.addShape(table); // line 119

    Ok  I have the table  on the page  I created a css with a background image called .search  How to I link that to the table so It shows the image
    I am only used to doing certain css items   Never didi this before
    THXS STeve

  • Excel and jsp

    Hi,
    I am writing into a jsp whose response content type is excel. I have a number value in one of the beans for which i am trying to display the full number and not round it off.
    for example my jsp page looks something like this
    <%@ page contentType="application/vnd.ms-excel" %>
    <td><bean:write name="transactionResult" property="pan" /></td>
    the value in pan is a large number like 215020175160527,
    when the jsp page opens up in excel its rounding it off to like 2.1502E+14. I am trying to make sure that it doesn't do that. Can it be done through my jsp code or is there some setting in excel that i can change so that its a permanent change. Please help.
    Thanks

    There are two products I am aware of that will factilitate this: JExcel and POI. I have used the latter, and it is relatively feature-rich and compatible with M$ Excel files. You can download a copy at jakarta.apache.org.
    - Saish

  • Jakarta-poi-1.5.0-FINAL-20020506.jar

    Where do I download jakarta-poi-1.5.0-FINAL-20020506.jar from ???
    Can anybody help me ???

    Hi Friends,
    I'm also on the same track. I download the jw-0332-poi from Resources of http://www.javaworld.com/javaworld/jw-03-2004/jw-0322-poi.html
    I compile CreateXL.java & ReadXL.java files & got compilation errors like:
    "cannot resoleve symbol class HSSFWorkbook
    "Cannot reslove symbol class HSSFSheet"
    and more error for HSSF package from org.apache.poi
    To solve this I download "poi-bin-3.0-Final-20070503.zip" from http://www.apache.org/dist/jakarta/poi/release/bin/
    and poi-src-3.0.1-FINAL-20070705.zip files fromApache download mirrors. i put it in classpath & then compile but still I got the same error.
    I didn't find jakarta-poi-1.5.0-FINAL-20020506.jar on http://www.apache.org/dist/jakarta/poi/release/bin/
    From where should I get the jakarta-poi-1.5.0-FINAL-20020506.jar ?
    I would appreciate your help for this topic.

  • Eclipse + appache poi

    Hi,
    what should I do first to import these
    import org.apache.poi.hssf.usermodel.HSSFCell;
    import org.apache.poi.hssf.usermodel.HSSFRichTextString;
    import org.apache.poi.hssf.usermodel.HSSFRow;
    import org.apache.poi.hssf.usermodel.HSSFSheet;
    import org.apache.poi.hssf.usermodel.HSSFWorkbook;
    import org.apache.poi.poifs.filesystem.POIFSFileSystem;
    where ca I find the libraries and how can I import them?
    I need it to read excel file.
    Thanks
    Edited by: user12876801 on 23.5.2011 7:59

    Ok...so I have these:
    poi-src-3.7-beta3-20100924.zip and poi-bin-3.7-20101029.zip
    how can I add them to project?
    Right click on project/ properties/ java build path/ libraries...and then what?...add JARs? add external JARs?...add variable?
    I am completely new

  • Reading/Writing .xlsx files using Webdynpro for Java

    Dear All
    I have a requirement to read/write excel files in .xlsx format. I am good in doing it with .xls format using jxl.jar. The jxl.jar doesn't support .xlsx format. Kindly help me in understanding how do I need to proceed on reading/writing .xlsx files using Webdynpro for Java.
    Thanks and Regards
    Ramamoorthy D

    i am using jdk 1.6.22 and IBM WebSphere
    when i use poi-3.6-20091214.jar and poi-ooxml-3.6-20091214.jar  to read .xlsx file. but i am getting following errors
    The project was not built since its classpath is incomplete. Cannot find the class
    file for java.lang.Iterable. Fix the classpath then try rebuilding this project.
    This compilation unit indirectly references the missing type java.lang.Iterable
    (typically some required class file is referencing a type outside the classpath)
    how can i resolve it
    here is the code that i have used
    public class HomeAction extends DispatchAction {
         public ActionForward addpage(
                             ActionMapping mapping,
                             ActionForm form,
                             HttpServletRequest request,
                             HttpServletResponse response)
                             throws Exception {     
                             String name = "C:/Documents and Settings/bharath/Desktop/Book1.xlsx";
               FileInputStream fis = null;
               try {
                   Object workbook = null;
                    fis = new FileInputStream(name);
                    XSSFWorkbook wb = new XSSFWorkbook(fis);
                    XSSFSheet sheet = (XSSFSheet) wb.getSheetAt(0);
                    Iterator rows = sheet.rowIterator();
                    int number=sheet.getLastRowNum();
                    System.out.println(" number of rows"+ number);
                    while (rows.hasNext())
                        XSSFRow row = ((XSSFRow) rows.next());
                        Iterator cells = row.cellIterator();
                        while(cells.hasNext())
                    XSSFCell cell = (XSSFCell) cells.next();
                    String Value=cell.getStringCellValue();
                    System.out.println(Value);
               } catch (IOException e) {
                    e.printStackTrace();
               } finally {
                    if (fis != null) {
                         fis.close();
                return mapping.findForward("returnjsp");

Maybe you are looking for

  • Report generation for PO

    I have made diffrent POs in last two months, among that some are closed. But there are so many POs whose status are not closed till its open. I want to cancel those POs (because these are no requirement) for that I want to generate the list of open P

  • Windows media player does not recognize new CD when changing CDs in drive

    I have a ThinkPad R61i that was purchased with a preinstalled downgrade from Vista to XP professional.  Whenever I rip CDs using the built in DVD/CD player/burner, WMP doesn't recognize a new cd when I put one in.  I am running WMP 11 for XP.  The fi

  • Online Meet-up 6. How does RFID infrastructure figure as a part of ESA ?

    ESA is a technology similar to RFID as a technology. For Ex: If a company does not have an SAP system at this moment. We have to work with their legacy system. Then we need to use the ESA. With the ESA, it will be easier to work with any system.ESA i

  • Draw Dynamic Column with Static Columns

    Hi All I have to show dynamic columns with static columns including column header and I am choosing the Cross Tab style. I have done this already in SSRS but failed to do in Crystal Report version (Crystal Report Basic for Visual Studio 2008). Name  

  • Dashboards PowerShell Grid Widgets - Grouping and Sorting?

    First of all, to those who made Dashboard PowerShell Grid Widgets possible - Thank you, Thank you, Thank you.  Love it!  So much more power except for the output...... Is there a way to group and sort my results or is it my system?  Clicking the colu