POI-Apache ERR

What is the solution people ?
The file exist in c drive with 2 sheets in excel file called
"As-Built and Design"
===================ERR==================
-1
The error occurred in D:\CFusionMX\wwwroot\1.cfm: line 16
14 : fis.close();
15 : </cfscript>
16 : <cfx_ExcelQuery action="read" file="c:\template.xls"
sheet="#sheetNumber#" variable="myQuery" />
17 : <cfdump var="#myQuery#">
=============Code=============
<cfscript>
fis = createObject("java",
"java.io.FileInputStream").init("c:\template.xls");
wb = createObject("java",
"org.apache.poi.hssf.usermodel.HSSFWorkbook").init(fis);
sheetNumber = wb.getSheetIndex("Sheet1");
fis.close();
</cfscript>
<cfx_ExcelQuery action="read" file="c:\template.xls"
sheet="#sheetNumber#" variable="myQuery" />
<cfdump var="#myQuery#">

What happens when you dump the value of sheetNumber before
you call your CFX tag? Also, if the excel file is called "As-Built
and Design", why are you trying to open template.xls? If
sheetNumber is set to a java NULL value, that could explain some
funky behavior by CF.

Similar Messages

  • How POI(apache) support multi-language?Urgent!!!

    Hi:
    I use POI(http://jakarta.apache.org/poi/)modify my excel(language is chinese),but excel not display chinese.
    How modify POI source code to support chinese? POI sourcecode default encoding is 8bit per char!

    Someone can help me?SOS!SOS!

  • POI [ Apache]

    Hi,
    I have installed cfx_excelQuery [ into web-inf\lib\ ], and
    registered the tag then extracted the zip[ poi-2.5.1-final-20040804
    ] into \web-inf\lib\ ...Then restarted the CF service ..still I am
    getting this...I am using CF server 6,1,0,63958 on windows 2000
    server..
    Object Instantiation Exception.
    Class not found: org.apache.poi.hssf.usermodel.HSSFWorkbook
    The error occurred in D:\CFusionMX\wwwroot\1.cfm: line 12
    10 : <cfscript>
    11 : fis = createObject("java",
    "java.io.FileInputStream").init("c:\template.xls");
    12 : wb = createObject("java",
    "org.apache.poi.hssf.usermodel.HSSFWorkbook").init(fis);
    13 : sheetNumber = wb.getSheetIndex("Sheet1");
    14 : fis.close();
    </script>
    <cfdump var="#sheetNumber#">

    Hi em,
    I tested your cfscript with poi-2.5.1-final-20040804.jar
    installed as follows:
    in cfusionmx\lib - code works
    in cfusionmx and added to classpath in jvm.config - code
    works
    in cfusionmx\wwwroot\WEB-INF\lib - code works
    I followed up with expanding the jar into WEB-INF\lib and the
    code failed, just as with yours. So, install the jar without
    expanding its contents and you should be good to go.

  • Apache err log on http server *broken pipe* each time a message comes thru

    I've noticed on our http server, each time a message comes through for B2B we consistently get the following entries in the Apache error log:
    (32)Broken pipe: MOD_OC4J_0087: Got an unexpected error while calling send() to send a message to oc4j and the error code is 32.
    MOD_OC4J_0053: Failed to call network routine to send out an ajp13 buffer message to oc4j.
    MOD_OC4J_0027: Failed to send out an ajp13 message to oc4j.
    MOD_OC4J_0026: Failed to marshal a request to ajp13 message headers or send them to the web container.
    Any idea what's causing this? Everything seems to be going through OK.
    I'm trying to track down an issue that occurred over the weekend. I don't think this is related, but I do need to address it.
    Thanks.
    [                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hello,
    Here is my 2 cents.
    Oracle recommends you set the Oc4jCacheSize parameter to reduce the occurrences of MOD_OC4J_0087 and
    related errors in your Apache error logs. To change this parameter, follow these steps:
    1. Stop the OPMN processes on the middle tier.
    2. On the middle-tier computer, open a terminal window and go to $ORACLE_HOME/Apache/Apache/conf.
    3. Enter the following command:
    cp mod_oc4j.conf mod_oc4j.conf.pre3604573
    4. Edit the mod_oc4j.conf file by adding the following line after the </IfModule> line, but before the
    Oc4Jmount /j2ee/* line:
    Oc4jCacheSize 0
    5. Start the OracleOPMN processes on the middle tier.
    I would still suggest to analyze the stack trace further for exact issues.
    Rgds,Ramesh

  • Modify existing excel file (POI API)

    Hi All,
    Can anybody give me a reference to an example to update/modify an exsiting excel file in java.
    For creation of excel file I am using POI API. But not getting how to update an existing excel file
    using POI API.
    I'll be thankful for your help.
    Regards
    Naz

    Tabbasum wrote:
    Hi All,
    Can anybody give me a reference to an example to update/modify an exsiting excel file in java.
    For creation of excel file I am using POI API. But not getting how to update an existing excel file
    using POI API.
    I'll be thankful for your help.
    Regards
    NazYou do know that the poi.apache.org site has some nice examples, don't you?
    http://poi.apache.org/spreadsheet/examples.html
    Many other examples exist on the Internet; Google is your friend.
    Hope that helps, Naz.
    Regards,
    Jay-Z

  • POI HSSF Excel 2002 Data error

    Hello,
    I'm using HSSF 3.0.2 Final version to create an excel document from java.
    This document contains pictures and some text under each picture in a row below. There are four sheets in the workbook and each contains about 30-40 pictures.
    I can create document fine and I can open it with Excel 2000,
    but when I try to open it with Excel 2002 and gives me data error.
    My understanding is that 2002 is supported and it seems to be a simple enough document without any fancy features
    Any idea what could be wrong?

    You can post your error and excel file to poi's mailing list.
    http://poi.apache.org/mailinglists.html

  • The supplied data appears to be in the Office 2007+ XML. POI only supports

    Hi all I'm having this exception when I'm trying to write a data to excel file.But I'm using open office not Microsoft excel.This must be the reason to get this.I'm using poi-3.0.2-beta1-20071204.jar. If any body knows a new jar or any solution please respond this.
    Thank you.
    KR.
    Samith

    Your topic subject and your message are really vague. What are you talking about?
    At least I can tell you that you can just check and download POI at their own homepage over there at [poi.apache.org|http://poi.apache.org/]. There's a beta version which supports the OpenXML format (xlsx, docx, etc). There is also another API which can handle OpenXML files: [OpenXML4J|http://www.openxml4j.org/].

  • POI and Office sw

    I would like to use POI (http://poi.apache.orgl) to export a PowerPoint to image on my server where I have a ppt file.
    I dont have MS Office loaded on my server. Can I still use POI to do this export or do I need to load MS Office PowerPoint on my server?

    POI doesn't require any Office software to do whatever it does. I run it on machines which aren't even Windows. So if it can produce that PowerPoint file, it's all you need.

  • Writing word file using POI

    HI!
    can any body help me in writing a new word file using Apache POI (Java API). any code or link.
    Thanks in advance

    http://poi.apache.org/hwpf/quick-guide.htmland
    http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/testcases/org/apache/poi/hwpf/

  • How to retrieve data from a read-only Excel file

    Hi Developers,
    I'm trying to retrieve data from a read-only Excel file. I used the same code that I used to retrieve data from a normal Excel file, but it can't work.
    My code is as followed:
    try
    InputStream KpExcel = new FileInputStream("kp.xls");
    HSSFWorkbook Kpwb = new HSSFWorkbook(KpExcel);
    HSSFSheet Kpsheet = Kpwb.getSheetAt(0);
    catch(Exception e)
    e.printStackTrace();
    System.out.println("Exception: "+e.getMessage());
    The error I received is as followed:
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:224)
    at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:160)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:163)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:210)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:191)
    at photoproductionsystem.IncomingWIPPanel.getKp(IncomingWIPPanel.java:118)
    at photoproductionsystem.IncomingWIPPanel.<init>(IncomingWIPPanel.java:76)
    at photoproductionsystem.TabbedDisplay.<init>(TabbedDisplay.java:47)
    at photoproductionsystem.Display.create(Display.java:73)
    at photoproductionsystem.Display.init(Display.java:44)
    at photoproductionsystem.Display.main(Display.java:229)
    Caused by: java.lang.ArrayIndexOutOfBoundsException
    at java.lang.System.arraycopy(Native Method)
    at org.apache.poi.hssf.record.UnknownRecord.<init>(UnknownRecord.java:62)
    at org.apache.poi.hssf.record.SubRecord.createSubRecord(SubRecord.java:57)
    at org.apache.poi.hssf.record.ObjRecord.fillFields(ObjRecord.java:99)
    at org.apache.poi.hssf.record.Record.fillFields(Record.java:90)
    at org.apache.poi.hssf.record.Record.<init>(Record.java:55)
    at org.apache.poi.hssf.record.ObjRecord.<init>(ObjRecord.java:61)
    ... 15 more
    Can someone please help me with my problem? Thanks a lot in advance!

    Madeline wrote:
    how do I ask at Apache mailing list?I wonder why it seems to be a strange idea to some people to look at the software vendor's site for product support. :p
    http://poi.apache.org/mailinglists.html

  • How to get the actual data of a file held in IWDResource object?

    Hello,
    I am uploading a csv/excel file and writing it to the server using the FuleUpload UI and IWDResource Interface.
    I need to make some things on the data before I write it:
    1. count the number of columns are in the csv/excel file in each line.
    2. replace special characters in the file using replaceAll for example.
    My problem is how to access the data once it is stored in the IWDResource interface? All I have there is the read method which generated an InputStream object to read bytes from the file.
    Any ideas?
    Roy

    If you want to read cell level or row level data from excel you should use third party APIs. Apache POI provides such an API, you can use and read the excel documents. You can refer the POI API
    <a href="http://poi.apache.org/hssf/quick-guide.html#ReadWriteWorkbook">here</a>.
    And if you want to read the CSV file content do the following..
    FileInputStream fis=(FileInputStream)wdContext.currentContextElement().get<attribute anme>().read(false);
    byte in[]      = new byte[512];
    String csvData;
    StringBuffer csvBuffer = new StringBuffer();
    while(fis.read(in)>0)
    csvData = new String(in);
    csvBuffer.append(csvData);
    //now write the logic to validate the csv data.
    Regards
    Abhilash

  • How to get the actual page cordinate a field

    I have 2 content areas CA1, CA2. CA1 is filled with dynamic table..which will flow into multiple page..at the end of the table I want the signature ..The signature has to be upper half of the page..since contents of the table are dynamic..it could be that the content could fill 3/4 of last page..so in which case I have to page break and go to next page and printed on the positioned place.
    The layout is flowed so it can overflow..I was planning to trigger a page break by putting a dummy field after the table and calculate the position of the dummy field with 0 width, 0 height which will be right after the table. If the position (dummyfield.y) has reach more than the upper half of the page.. it will trigger  next page where the signature will be printed in the first half of the page in CA2...
    But dummyfield.y always gives me a 0..because it is with respect to the previous container or something.. Any one with brighter ideas...
    thanks

    If you want to read cell level or row level data from excel you should use third party APIs. Apache POI provides such an API, you can use and read the excel documents. You can refer the POI API
    <a href="http://poi.apache.org/hssf/quick-guide.html#ReadWriteWorkbook">here</a>.
    And if you want to read the CSV file content do the following..
    FileInputStream fis=(FileInputStream)wdContext.currentContextElement().get<attribute anme>().read(false);
    byte in[]      = new byte[512];
    String csvData;
    StringBuffer csvBuffer = new StringBuffer();
    while(fis.read(in)>0)
    csvData = new String(in);
    csvBuffer.append(csvData);
    //now write the logic to validate the csv data.
    Regards
    Abhilash

  • Problem in Reading XLSX File (MS EXCEL 2007).

    Dear All ,
    I am reading all the properties to XL sheet and then utilising it in my code .
    I am getting some problem in reading the Border of the Cell , my code is working fine with most of the Excel Sheet but it can not correctly read the Border of a few Excel files.
    I am using the method ,
    getBorderBottomEnum()
    or
    getBorderBottom()
    but I can not read the Border used correctly for all the Excel Sheet .
    Please Help.
    Please revert if I am not clear.
    Thanking You All.

    I'm guessing that your question is about Apache POI. They don't have a forum AFAIK, but they do have a [url http://poi.apache.org/mailinglists.html]mailing list.
    John

  • Excel file processing in jsp

    Hello friends
    I want to read Excel files jsp(or java).I used sql driver,but it does'nt reads the file properly.I want to read file in jsp.I went thr many sites and found many ways like apache poi,JExcel api etc
    I found JExcel api is not free.I am getting errors with poi.I found no proper documentation on it.On apache site there are many versions to download poi packages.I confused about which to download.
    If any one has used poi successfully,please let me know

    related to POI
    **POI**
    Site
    http://poi.apache.org/Api
    http://poi.apache.org/apidocs/index.htmlExamples
    http://www.google.co.in/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=7WV&q=POI+examples&btnG=Search&meta=

  • Can I display a MS Word Document as part of a page

    Hi,
    Is it possible to display a MS Word document as part of a page (i.e. in a panelForm, panelBox) with ADF Faces? Any help is appreciated.
    Best Regards,
    Salim

    Hi,
    No, its impossible. I have never had that requirement, but if you want to review Word document as JSF page fragment, you can try to create helper servlet that gets MS Word and converts it to HTML (e.g using Apache POI - library to access Microsoft format files http://poi.apache.org/ ). Then you can try display this HTML using iframe or <jsp:include> and <f:verbatim> tag in your jsf page. I'ts my fast and free think - I have never tried this.
    Kuba

Maybe you are looking for

  • Email Titles without bodies that cannot be deleted

    Salam, On my Mail I have a folder under "On My Mac" that has three email messages. The problem with these emails is the following: 1. I cannot see the body of the message... it shows blank. 2. I cannot even delete these emails... it just turns gray b

  • Update data SLD

    Hi, I have installed a JAVA Stack with the EC EHP1 where I installed the SLD. I setup ECC 6.0 to send information to the SLD but I am not able to update the data. When you perform a query in the Technical System of the column "Last Update" does not u

  • HOw to use midi?

    I'm very new at this so excuse my question but 'm trying to record midi by using the m-audio keys and it's recording many pieces of midi on one track...some i hear but can't see the actual midi.I tried to glue the broken midi pieces with the glue sti

  • HT4863 Where do I find the "Outbox" in iCloud Mail?

    How can I check my mail Outbox for a backlog of messages? I cannot find a link or folder for Outbox.

  • Facebook on Blackberry Bold

    The Facebook app on my Blackberry Bold continually shows all my friends posting "View Today's Photo of the Day!" This does NOT show up on my iPad or on my HP laptop. Anyone know how I can change my FB settings on my phone to eliminate these? Thanks.