Update apache POI on CF9

Hi all

I found this link for CF10.

Disgruntled boffin

I try the same thing in CF9, but it does not work. I'm using poi v 3.11 Beta 3.

Anyone updated to the new poi on CF9?

Thanks in advance

I was able to do, I've updated the CF 9 with the latest patches and also use java SDK 1.7.

Tags: ColdFusion

Similar Questions

  • [ADF, JDev12.1.3] Problem of formatting attribute VO MONEY when exports it as an Excel file using apache.poi

    Hallo,

    I have a VO with an attribute based on the field of database of MONEY.

    In the configuration of the VO for the attribute I put:

    • In the "Details" tab: Type = BigDecimal
    • In the "Indications of the UI" tab: Format type and Type like the image below

    Immagine.png

    These settings allow the value of the attribute (in the table, inputText) appears with thousands and decimal separator that according to my language - Italian - are. (point) and, (comma).

    For example. Silver number displayed correctly:

    10.123.000,37

    When I write the value of the attribute in an Excel cell using apache.poi...

    cell.setCellValue (attr.toString ());

    ... I see in the cell...

    10123000.3700

    ... Although I'd like to see what...

    10123000,37 (not thousands separator, the comma as separator decimal and only 2 decimal places)


    You could you kindly help me to get there?

    Thank you

    Federico

    Federico, this isn't really a question JDev or ADF. This can be solved by setting the cell format to the cell, you write the number. Like oyu would in excel

    style.setDataFormat(HSSFDataFormat.getBuiltinFormat("#,##0.00"));

    more info on HSSFDataFormat (javadocexamples.COM JAVA DOC BY EXAMPLES) - API, usage, demonstrations and code examples

    Timo

  • Difficulty facing export .xlsx by Apache POI

    I use Jdeveloper 11.1.1.7

    I need to export .xlsx file af:table using Apache POI. I have not used all the attributes of VO in my af:table. I need to export only the visible columns in the same order as in the user interface.  The user may change the order of the columns in the user interface, so I need to look at also.

    I followed http://www.techartifact.com/blogs/2013/08/generate-excel-file-in-oracle-adf-using-apache-poi.html#sthash.CaVkCeKl.dpbs for reference. Here, he is given to browse all attributes in VO and exported in excel via apache POI. So, I could not able to follow this approach. And I couldn't use the HeaderText property in af:column to match with the attributes of the VO, since we used a different name for HeaderText in the user interface.

    So please guide me to achieve the requirement.

    Thank you and best regards,

    Assia.

    There is a lot of work.

    For starters, take a look at:

    https://technology.AMIS.nl/2012/03/02/ADF-11g-programmatically-repositioning-columns-in-a-rich-table/#prettyPhoto

    and attention to

    reorganizeColumnsInTable()

    function

    In this way, you can browse columns of tables. Now, in general, inside the af: column, you have a few af:outputText, which tells you what attribute VO are displayed in this column.

    So download af:outputText (child column) and see what is the "value" property, for this you can use

    ValueExpression ve = outputText.getValueExpression("value");
    String valStr = ve.getExpressionString();
    

    the valStr will be something like:

    #{rank. EmpName}

    Parse this string to get the real name of the VO (EmpName in this case) displayed in this column attribute

    ... had a point?

  • Caused by: java.lang.NoSuchMethodError: org.apache.poi.ss.SpreadsheetVersion.getMaxCellStyles () I

    Hi all

    I used poi - 3.12 in my project because I need to read xlsx files

    and installed used webcenter poi - 3.5

    I get this error in my code:

    Caused by: java.lang.NoSuchMethodError: org.apache.poi.ss.SpreadsheetVersion.getMaxCellStyles () I

    Please guide me

    Thanks in advance

    Maybe you can try with

    true

    in your weblogic.xml.

    If not enough, you should research how to replace poi next to webcenter

  • Hanging application while created workbook XSSF (Apache POI)

    Hello

    We have developed an application (using Netbeans) which, in a single windows is asking for some parameters, reading a few Oracle database data and creating a xlsx spreadsheet on the client side.

    Everything works fine, but we have only one user (among 20 using our application) who has a problem. When the application needs to start creating the file xlsx, it hangs, the file is not yet created on the client side. This only happens on a specific computer

    We cannot reproduce this behavior in our development environment, or in any other machine.

    I tried to create a file xls xlsx (using the HSSFWorkbook instead of XSSFWorkbook) and the problem is not displayed in his laptop. So the behavior seems to be specifically associated with this problem. The Apache POI library used is 3.11.

    Is it possible to track client (no right to administrator unfortunately on this machine) and see exactly what causes this problem only on this machine?

    Note that only JRE is installed on this computer.

    Kind regards.

    Alberto

    Hello

    After you find the error and cheking out how Netbeans using the path class the only problem that could cause the problem was an external library during installation of the JRE.

    For some reason any on the laptop user, there was a library external xbeans.jar (lib/ext under JRE path) including and the old version of the XmlOptions class.

    Remove the old library xbeans, jre lib/ext pot has solved the problem.

    Kind regards.

    Alberto

  • Can I process Excel BIFF5 files, or simply abandon Apache POI?

    For the experienced:

    I am totally new to processing the files using Java Microsoft Excel and embarks on Apache POI. Now it seems that I might be completely out of luck because of Excel files, I'm in the process.

    Now looking back, I realize account I got what I got with Excel file (.xls file) was opened in Excel 2007 and clicked on the "Save" button. And it's all OK POI learning by the transformation of this file. Now, after all the work I've done with this file, I trashed it and got a copy of the original Excel file - as is, without first loading in Excel 2007 and recording - and run my java program on it. And I got the following error message speaks BIFF5 and BIFF8:


    C:\Oracle\Middleware\jdk160_18\bin\javaw.exe-client - classpath
    C:\apps11113\JavaExercise\. ADF; C:\apps11113\JavaExercise\Basic\classes; C:\java_lib\poi-3.7\poi-3.7-20101029.jar
    -Djavax.NET.SSL.trustStore=C:\Oracle\Middleware\wlserver_10.3\server\lib\DemoTrust.jks learnjava. ExcelTest2
    Exception in thread "main" org.apache.poi.hssf.OldExcelFormatException: the provided spreadsheet seems to be in Excel 5.0/7.0 format (BIFF5).
    POI only supports the BIFF8 format (from versions of Excel 97/2000/XP/2003)


    My program, when put into production, will run the schedule and unattended and will have to treat the file as it is. I'm out of luck and need to find some other APIs that support BIFF5? Is there some these APIs?

    Thank you very much for help!


    Newman

    Where do you find excel files? Would it be possible to have the provider upgrade its machines to provide the latest files?

    You can try the 'other' Java API Excel, JXL or whatever he called to see if she can manage obsolete formats.

  • Exception if you use Apache POI in ADF

    Goodmorning;

    I use jdev 11g, I'm trying to use Apache POI to import the content of Microsoft XL file in my database.

    I already do this with success on netbeans. but not on jdev.

    first of all, I have download the POI package on the site web apache, and I create a library and add the jdev jar files 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-block-notes - 3.6 - 20091214.jar.

    Create a page with a button jsf, then activate the link to this page using the design-> Page-> binding component properties-> check Auto link

    in the action of the buton method, 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);
    Line HSSFRow = null;
    for (Iterator Tricard = sheet.rowIterator (); rowIt.hasNext ();) {

    line = rowIt.next () (HSSFRow);
    Code HSSFCell = row.getCell (0);
    Name HSSFCell = row.getCell (1);
    HSSFCell dt = row.getCell (2);
    java.util.Date date = dt.getDateCellValue ();
    System.out.println ("code" + code + "% name" + name + "% 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 exception) e {}
    e.printStackTrace ();
    } catch (IOException e) {}
    e.printStackTrace ();
    }
    Returns a null value.
    }
    }



    and when I run my page and click on the button, this exception page appears:

    Error 500 - Internal server error

    javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/apache/poi/rich/usermodel/HSSFWorkbook
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
    to 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)
    to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:420)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
    to 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)
    to 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)
    to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.doIt (WebAppServletContext.java:3684)
    to 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/rich/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/rich/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)
    ... more than 43
    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

    Have you checked "Deploy default" when you created the library?

    John

  • AMS 5 works with Apache 2.4?

    We have updated Apache 2.2 to 2.4 (at the suggestion of our security team) as shown here: https://helpx.Adobe.com/Adobe-Media-server/config-Admin/configuring-Apache-server.html We could get then not AMS services to start.  We have seen a post that AMS 5 does not work with Apache 2.4. Is this true? What are we missing?

    Did a clean install of AMS 5.0.8 and Apache 2.4. Everything seems to work.

  • creating file using POI excel

    Hi all

    I want to generate excel file. I can't use the default functionality of the ADF. I use POI.can some give me the link for poi in the ADF.

    I want a cell formatting in excel so...

    Please help me...

    Visit this link

    Generate the Excel file into Oracle ADF using Apache POI. Techartifact

    and layout of u cn use http://www.techartifact.com/blogs/2013/08/setting-styles-formula-in-excel-file-using-apache-poi.html

  • CF9.0.1 + CHF4 and IIS 6 32-bit application pools: question of versions of wsconfig.jar?

    I made an update of the test CF9.0.1 + CHF4 installation and then updated on web servers remote IIS 6, running 32-bit wsconfig.jar application pools. IIS connections to servers remote backend ColdFusion failed; I stepped back to old wsconfig.jar


    Wsconfig.jar that is updated with ColdFusion 9 Update 1 does not work with our IIS6 web 32-bit application pools; older wsconfig.jar [JRun 4.0 (Build 108795) JRun ISAPI Extension - August 29, 2009 11:51:27] work with the 32-bit application pools.

    Question: can I I safely old wsconfig.jar on 32-bit IIS 6 application pools run [JRun 4.0 (Build 108795) JRun ISAPI Extension - August 29, 2009 11:51:27] CF 9.0.1 + CHF4?

    We are running in distributed mode.

    Thank you

    Scott

    Hi Scott,.

    Thanks for posting your request.

    What is your ColdFusion installed as 64 bit or 32 bit?

    Yes, you are right that there is difference of Wsconfig utility 9.0.0 CF and CF 9.0.1. However, you can still use ColdFusion 9.0.1 with 32-bit AppPool. You must make some changes manually to make it work.

    When you create the connector with this utility, and if you're running 64 bit CF 9, you will need to replace the 32-bit dll in the wsconfig folder to your workinig app that uses 32-bit AppPool.

    Article to configure the connector in the distributed environment:

    http://helpx.Adobe.com/ColdFusion/KB/manually-configure-Web-server-connector.html

    Here is an article to create the manual connector with IIS 6.

    icrosoft_IIS_6 http://helpx.adobe.com/ColdFusion/KB/Manually-Configure-Web-Server-Connector-1.html#main_M

    IIS 7 http://www.adobe.com/devnet/coldfusion/articles/iis-configuration.html

    Also, if you are facing issue or doubt please send your query to [email protected]

    Thank you

    Priyank

  • POI: If Cell.CELL_TYPE_BLANK is useful at all, how to use it?

    For the experienced:

    I'm new to process Microsoft Excel using Java files. I'm now using the library Apache POI in JDeveloper 11.1.1.3 and some problem check if a cell is empty or not.

    The spreadsheet has several columns, and I work with and extract only the 5 of them. The spreadsheet, I received, I found empty cells in two columns by visually browsing the lines in these columns. The manipulation of a cell will be different depending on whether the cell is empty. Therefore, I must be able to determine if a cell is empty.

    The interesting (and frustrating) thing is that empty cells in these two columns are very different.

    Here is the code I have to treat cells:
    loopingRows:
    while (rows.hasNext()) {
       HSSFRow row = (HSSFRow)rows.next();
    
       String col11Value = null;
    
       // These are the columns I am interested in:
       int[] targetCols = { 5, 6, 7, 11, 26 };
    
       for (int colNum : targetCols) {
          HSSFCell cell = row.getCell(colNum);
    
          // Code specific to the column:
          switch (colNum) {
          case 5:
             // ...
             break;
          case 6:
             // ...
             break;
          case 7:
             // ...
             break;
          case 11:
             if (cell.getCellType() == Cell.CELL_TYPE_BLANK) {
                System.out.println("Column 11 is blank.");
                continue loopingRows;
             } else {
                col11Value = cell.getStringCellValue();
             }
             break;
          case 26:
             if (cell.getCellType() == Cell.CELL_TYPE_BLANK) {
                System.out.println("Column 26 is blank.");
                continue loopingRows;
             } else {
                // ...
             }
             break;
          }
       }
       System.out.println("Column 11 value is " + col11Value);
    }
    Columns 11 and 26 are in which I deal with empty cells. But < tt > < font color = "green" > Cell.CELL_TYPE_BLANK < / police > < /tt > works with any column.

    With column [26], the < tt > < font color = "green" > if (cell.getCellType () == Cell.CELL_TYPE_BLANK) < / police > < /tt > throws a NullPointerException, that is, an empty cell is obviously considered void. Who was bypassed by using < tt > < font color = "green" > if (cell == null) < / police > < /tt >. That's fine, as I can put the code to handle an empty cell in the fi block {} and manipulation code of nonblank cells in the {else} block, and I can handle empty cells and not empty.

    However, with column [11], or only the < tt > < font color = "green" > if (cell.getCellType () == Cell.CELL_TYPE_BLANK) < / police > < /tt > throws an exception, nor made in the if {} code block executed. If the cell is not empty, the code in the else {} code block is executed, and the message 'value of column 11's... "is printed. But if the cell is empty, the if {} block is bypassed simply quietly - the message "column 26 is empty." is not printed in the console at all. But the < tt > < font color = "green" > continue loopingRows; < / police > < /tt > statement seems to be executed, because the message 'value of column 11's... "is not printed. I need to deal with empty cells in column 11, but I'm stuck.

    Two things are intriguing for me here:

    1. that means < tt > < font color = "green" > (cell.getCellType () == Cell.CELL_TYPE_BLANK) < / police > < /tt > return to column 11 when a cell is empty? If it returns true, why println() does not print? If it's wrong, why is "continue loopingRows;" statement is executed? How to use the Cell.CELL_TYPE_BLANK?

    2. in the spreadsheet and watching the empty cells in columns 11 and 26, I put the cursor in the cell at the top of the column and press Ctrl + down (arrow down). With 26 column, the cursor stops to before the first blank cell that it finds. But when I did the same thing with column 11, the cursor jumps all the blank cells and stops at the bottom of the column. I had to scroll line by line to visually catch empty cells. If you examine each of the empty cells, indeed there nothing there. But I wonder if this could be misleading. Why the key Ctrl-down act differently with the two columns?

    Thank you very much for your help!


    Newman

    Cell.CELL_TYPE_BLANK seems to be a CellType XSSFCell and not HSSFCell. Take a look at the javadocs for getCellType() of each cell method, and there is a viable list of CellTypes.

    The rest of your questions have intrigued me as well. Your columns 11 and 26 have any special formatting for them? Maybe like 11 is standard text while 26 is digital? Just shooting from the hip here, but it looks like maybe a cell of the empty string is treated as an empty string, while an empty cell digital deals as a "null".

    I'm not at a computer now where I can do all the tests, but if I fall whereupon it is subsequently let you you know.

    Published by: almightywiz on April 25, 2011 16:01

  • spreadsheetsetcellformula

    • Version: 9.0.1, ColdFusion standard
    • Server operating system: Windows 2008 R2
    • Web server: Apache 2.2.19

    I'm having a problem with the tick marks (') when you use the function in the formula.  I'm putting a formula in Excel that draws a different tab.  In Excel, it is simply: = 10-00-en course! HB10.  I guess I can then use the wrapper:

    < cfset spreadsheetSetCellFormula (sObj, "10-00-run! (HB10", 10, #column #) >

    It gives me this error:

    An exception has occurred when using action = update.

    org.apache.poi.ss.formula.FormulaParser$ FormulaParseException: entry is not used [HB10] after attempting to analyze the formula [#REF! HB10]
    The error occurred in C:\Program Files (x 86) \Apache Software Foundation\Apache2.2\htdocs\Accounting\wipNonCM.cfm: line 216


    I tried all variations of course and the tick marks I can think of and still nothing.

    Any help would be appreciated.


    Perhaps POI complains because the worksheet object does not contain a sheet named "Test" at this time, making the invalid formula.  Try to create two leaves first, then saving it.

    
    
    
    
    
    
    
    
    
    
  • [ADF, JDev12.1.3] A loop on af: table through "dcIteratorBindings.getAllRowsInRange" takes only 25 lines. Why?

    Hallo,

    I would like to export an af:table in Excel and I tried to apply the method described here http://www.techartifact.com/blogs/2013/08/generate-excel-file-in-oracle-adf-using-apache-poi.html#sthash.VSEYBrdd.UPOaYZ... by vinaykumar2.

    I noticed that the return Excel file contains max 25 rows.

    The VO behind af: table has the default configuration.

    The RangeSize of the iterator property is 25.

    oracle.jbo.Row[] rows = dcIteratorBindings.getAllRowsInRange();
    

    If I put it at 100, the return Excel file contains 100 rows max.

    I would always that all af:table are exported, so I guess I have to settle RangeSize on a very high value (e.g. 100000).

    Is RangeSize property to play with to solve the problem? Or there is a setting/alternative code to use? It affecting a high value will have an impact on performance?

    Thank you

    Federico

    Hi Federico,.

    The RangeSize - 1 value property. You will get all the lines.

  • How to import data in Excel sheet to the database using ADF BC

    Hello

    Can someone help me in suggesting how to import data from excel to database.

    Thank you

    Kunal Sharma

    Hello

    You can use the API to read each line of the file excel with your application and the creation of lines for each line that you read.

    See link

    http://www.codejava.NET/coding/how-to-read-Excel-files-in-Java-using-Apache-POI

  • XLSX files to PDF with Peoplecode and Java (XSSFWorkbook)

    I'm working on a project to convert Excel .xlsx files pdf files. I did some research and found that maybe using Java in Peoplecode is the best way. Correct me if I'm wrong. I'm still pretty new on this.

    I installed these libraries of Java:

    • POI - 3.11.jar
    • Commons-codec - 1.9.jar
    • POI-ooxml - 3.11.jar
    • POI-ooxml-schemas - 3.11.jar
    • XMLBeans - 2.6.0.jar
    • Stax-api - 1.0.1.jar

    I am using the reflection technique. I started my code to read a .xlsx file and I'm stuck here:

    Local string & file_name = "C:\temp\test1.xlsx";

    Type local integer & tempint = 0;

    Local JavaObject & input_file = CreateJavaObject ("java.io.File" and file_name);

    Local JavaObject & XSSFWorkbook = CreateJavaObject ("org.apache.poi.xssf.usermodel.XSSFWorkbook", & input_file);

    Local JavaObject & jClass = GetJavaClass ("java.lang.Class");

    Local JavaObject & joint = GetJavaClass ("java.lang.Integer");

    Local JavaObject & jIntType = & jInt.TYPE;

    Local JavaObject & jIntArgTypes = CreateJavaObject ("java.lang.Class []", & jIntType);

    Local JavaObject & jGetSheetAt = & XSSFWorkbook.getClass () .getDeclaredMethod ("getSheetAt", & jIntArgTypes);

    Local JavaObject & jSheet1 = & jGetSheetAt.invoke (& XSSFWorkbook, CreateJavaObject ("java.lang.Object []", CreateJavaObject ("java.lang.Integer", "0")));

    REM JavaObject Local & jSheet1 = & jGetSheetAt.invoke (& XSSFWorkbook, CreateJavaObject ("java.lang.Object []", 0));

    Local JavaObject & jRowIterator = & jSheet1.getClass () .getDeclaredMethod ("iterator", Null);

    Local JavaObject & jIterator = & jRowIterator.invoke (& jSheet1, CreateJavaObject ("java.lang.Object []"));

    REM JavaObject Local & jRowNext = & jIterator.getClass () .getDeclaredMethod ("next", Null);

    REM JavaObject Local & jNextRow = & jRowNext.invoke (& jIterator, CreateJavaObject ("java.lang.Object []"));

    REM JavaObject Local & jRowHasNext = & jIterator.getClass () .getDeclaredMethod ("hasNext", Null);

    REM JavaObject Local & jHasNext = & jRowHasNext.invoke (& jIterator, CreateJavaObject ("java.lang.Object []"));

    The last four commented lines are where I have a lot of trouble with. I understand, finally, I need to put them in a while loop to read each line which contained and that each cell. But I still can't get there. I don't seem to be able to call the next() and hasNext() methods correctly. When I Uncomment the first two lines to call next(), it gives me error "Exception Java: java.lang.InternalError: during the java.lang.reflect.Method.invoke call.» VH_XLTOPDF (2 763). PRINCIPAL. «GBL.default.1900 - 01 - 01.Step07.OnExecute PCPC:1675 statement: 14»

    And when I Uncomment the last two lines to call hasNext(), it gives an error "Exception Java: java.lang.NoSuchMethodException: java.util.TreeMap$ ValueIterator.hasNext (): during the java.lang.Class.getDeclaredMethod call.» VH_XLTOPDF (2 763). PRINCIPAL. «GBL.default.1900 - 01 - 01.Step07.OnExecute PCPC:1539 statement: 13»

    Any help would be appreciated. Or, if this is the wrong way to get what I'm trying to achieve, please advice. Thank you much in advance.

    I hope you're on 8.54? If so, you might be better to use a server side of technical script described by Jim Marion on his blog. Otherwise, you will encounter a lot of problems with the reflection which is a pain to say the least.

    Jim's PeopleSoft journal: JavaScript on the application server: Scripting PeopleCode

    I tried to play with she me and found it very convenient to overcome the problems of reflection (see step 3 in the link below).

    http://pe0ples0ft.blogspot.com/2015/11/implementing-reCAPTCHA-20-in-PeopleSoft.html

    In addition, this thread talking about it a bit. Someone has used this technique for POI libraries to create spreadsheets.

    The Java Exception: java.lang.reflect.InvocationTargetException: during the java.lang.reflect.Method .invoke call.

    Hope that gives you some ideas. Thank you!

Maybe you are looking for