Error reading Excel file

Hi,
I'm trying to read in an XSLX using the XLSDataReader and am having some issues.
I've narrowed down the issue to 3 adjacent columns in my file and if I map any of these three columns in the reader component, I get an error message:
>
ERROR [WatchDog] - Node XLS_GROUPS finished with status: ERROR caused by: Cannot get a text value from a error cell
ERROR [WatchDog] - Node XLS_GROUPS error details:
java.lang.IllegalStateException: Cannot get a text value from a error cell
at org.apache.poi.xssf.usermodel.XSSFCell.typeMismatch(XSSFCell.java:845)
at org.apache.poi.xssf.usermodel.XSSFCell.getRichStringCellValue(XSSFCell.java:294)
at org.apache.poi.xssf.usermodel.XSSFCell.getStringCellValue(XSSFCell.java:246)
at org.jetel.data.parser.XLSXDataParser.parseNext(XLSXDataParser.java:487)
at org.jetel.data.parser.XLSParser.getNext(XLSParser.java:132)
at org.jetel.util.MultiFileReader.getNext(MultiFileReader.java:415)
at org.jetel.component.XLSReader.execute(XLSReader.java:606)
at org.jetel.graph.Node.run(Node.java:414)
at java.lang.Thread.run(Thread.java:619)
WARN [exNode_0_1306204897681_TRASH0] - TRASH0thread interrupted, it will interrupt child threads
java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at java.lang.Thread.join(Thread.java:1151)
at org.jetel.component.Trash.executeWithoutWriter(Trash.java:278)
at org.jetel.component.Trash.execute(Trash.java:241)
at org.jetel.graph.Node.run(Node.java:414)
at java.lang.Thread.run(Thread.java:619)
ERROR [TRASH0_0.InputThread#0] - 34: thread forcibly aborted
java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:485)
at org.jetel.graph.DirectEdge.fillReadBuffer(DirectEdge.java:216)
at org.jetel.graph.DirectEdge.readRecordDirect(DirectEdge.java:182)
at org.jetel.graph.Edge.readRecordDirect(Edge.java:363)
at org.jetel.component.Trash$InputReader.run(Trash.java:471)
>
I have no idea what an "error cell" is but it's a simple text column in the spreadsheet.
Any thoughts?
Thanks in advance!
Chris

So I found the culprit.
One of the cells in the sheet had an actual value of #N/A, but not as a result of a formula.
Apparently, the XLSDataReader will interpret this as an error value.
Simply removing the # fixes this and the file is read in without any problems.
Hope this helps out others.
Chris

Similar Messages

  • 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 );

  • Error while reading excel file from application server into internal table.

    Hi experts,
    My requirement is to read an excel file from application server into internal table.
    Hence I have created an excel file fm_test_excel.xls in desktop and uploaded to app server using CG3Z tcode (as BIN file type).
    Now in my program I have used :
    OPEN DATASET v_filename FOR INPUT IN text mode encoding default.
    DO.
    READ DATASET v_filename INTO wa_tab.
    The statement OPEN DATASET works fine but I get a dump (conversion code page error) at READ DATASET statement.
    Error details:
    A character set conversion is not possible.
    At the conversion of a text from codepage '4110' to codepage '4103':
    - a character was found that cannot be displayed in one of the two
    codepages;
    - or it was detected that this conversion is not supported
    The running ABAP program 'Y_READ_FILE' had to be terminated as the conversion
    would have produced incorrect data.
    The number of characters that could not be displayed (and therefore not
    be converted), is 445. If this number is 0, the second error case, as
    mentioned above, has occurred.
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_CONVERSION_CODEPAGE', was not
    caught and
    therefore caused a runtime error.
    The reason for the exception is:
    Characters are always displayed in only a certain codepage. Many
    codepages only define a limited set of characters. If a text from a
    codepage should be converted into another codepage, and if this text
    contains characters that are not defined in one of the two codepages, a
    conversion error occurs.
    Moreover, a conversion error can occur if one of the needed codepages
    '4110' or '4103' is not known to the system.
    If the conversion error occurred at read or write of  screen, the file
    name was '/usr/sap/read_files/fm_test_excel.xls'. (further information about
    the file: "X 549 16896rw-rw----201105170908082011051707480320110517074803")
    Also let me know whether this is the proper way of reading excel file from app server, if not please suggest an alternative .
    Regards,
    Karthik

    Hi,
    Try to use OPEN DATASET v_filename FOR INPUT IN BINARY mode encoding default. instead of OPEN DATASET v_filename FOR INPUT IN text mode encoding default.
    As I think you are uploading the file in BIN format to Application server and trying to open text file.
    Regards,
    Umang Mehta

  • How to read Excel file in java

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

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

  • Adapter module to read excel file -java code required for PI 7.1

    Hi PI experts,
    I am working on PI 7.1 SP 08.
    I am trying to develope an adapter module to read excel file
    http://wiki.sdn.sap.com/wiki/display/ABAP/AdapterModuleToReadExcelFilewithMultipleRowsandMultiple+Columns
    but here in this wiki , given java code is for pi 7.0 and it is using jar file from PI 7.0
    I tried with using corresponding PI 7.1 files
    com.sap.aii.af.lib.mod.jar:
    sap.comtcloggingjavaimpl.jar:
    com.sap.aii.af.svc_api.jar:
    com.sap.aii.af.cpa.svc_api.jar:
    com.sap.aii.af.ms.ifc_api.jar:
    jave program is not throwing any error in NWDS but After deploying file on server.
    i am getting this errot in communication channel
    2009-12-15 15:47:08 Information AO: Now calling the Convert Method to convert Excel to XML.
    2009-12-15 15:47:08 Error MP: exception caught with cause javax.ejb.TransactionRolledbackLocalException: nested exception is: java.lang.RuntimeException: java.lang.UnsupportedClassVersionError: Bad version number in .class file; nested exception is: javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.UnsupportedClassVersionError: Bad version number in .class file; nested exception is: javax.ejb.EJBTransactionRolledbackException: nested exception is: java.lang.RuntimeException: java.lang.UnsupportedClassVersionError: Bad version number in .class file; nested exception is: javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.UnsupportedClassVersionError: Bad version number in .class file
    since i am not a JAVA expert so i am unable to resolve this error
    if some one has already deployed this module for PI 7.1, then please provide me java code for PI 7.1
    Thanks
    sandeep sharma

    hi,
    please try this:
    obj = inputModuleData.getPrincipalData();
    msg = (Message) obj;
    amk = new MessageKey(msg.getMessageId(),msg.getMessageDirection());
    XMLPayload xpld = msg.getDocument();
    Workbook wb = Workbook.getWorkbook((InputStream) xpld.getInputStream());
    xmldata ="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n"+ "<ns0:"msgType" ""xmlns:ns0=\""nameSpace+"\">";
    Cell[] cells ;
    Cell[] cellNames ;
    cellNames = wb.getSheet(0).getRow(0);
    for(int j=1;j<wb.getSheet(0).getRows();j++)
    xmldata = xmldata+"<Record>";
    cells = wb.getSheet(0).getRow(j);
    for(int i=0;i<wb.getSheet(0).getColumns();i++)
    xmldata = xmldata"<"cellNames<i>.getContents()">"cells<i>.getContents()"</"cellNames<i>.getContents()+">";
    xmldata = xmldata+"</Record>";
    xmldata = xmldata"</ns0:"msgType+">"; 
    wb.close();
    byte byt[] = xmldata.getBytes();
    xpld.setContent(byt);
    inputModuleData.setPrincipalData(msg);
    Thanks,
    Mayank

  • Read Excel file path in WD

    Hi,
    We want to read a excel file. For that we are using file upload UI element and HSSF POI to read excel file. The code to read the excel file is working fine in standalone. In standalone we are hardcoding the file path. But in WD application, we are not hard coding it.
    We are using following code to supply the file name to HSSF code through  file upload UI:
    try
             InputStream in = new FileInputStream(wdContext.currentContextElement  
                                               ().getFileResource());
             wdComponentAPI.getMessageManager().reportSuccess("IN "+in);
             HSSFWorkbook wb  = new HSSFWorkbook(in);
    catch (Exception e)
         wdComponentAPI.getMessageManager().reportSuccess("ERROR in HSSF");
    Where FileResource is a context variable binded with property "data" of FileUpload UI element.
    Now, the problem is that the excel file is not getting read. We are getting ERROR in HSSF message.
    Please help in reading the file path.
    Regards,
    Vaibhav

    Hi,
       Try this:
    InputStream in = wdContext.currentContextElement().getFileResource().read(false);
    Regards,
    Satyajit.

  • Error reading from file glibc-2.5-24.i686.rpm RHEL 5 Setup stuck at 80%

    Hi, I am installing Oracle 10g on RHEL 5 (Red Hat Enterprise Linux 5) machine I am facing two problems
    1) while installing the rpm packages the following package gave an error
    Error reading from file glibc-2.5-24.i686.rpm
    2) I still gave a try to runInstaller command the installer opened but was stuck at 80%
    I have 3 GB ram and 320GB hard drive I am not sure what to put in the swap memory and other settings i blindly followed instructions given here
    http://www.oracle-base.com/articles/10g/OracleDB10gR2InstallationOnRHEL5.php
    What could be the problem where do I find the error log if its created
    Please help me
    Thanks
    Edited by: 891355 on Nov 6, 2011 12:06 PM

    I found the installActions file in the installer folder and I think this could be the problem
    INFO: The 'shiphomeproperties.xml' file is missing from shiphome location '/home/oracle/Desktop/database/install/../stage/products.xml.' Add this file to the 'Disk1/stage' directory of the shiphome.
    though I am attaching the log file for more details do you think the installer is corrupt :(
    InstallActions log file ==> http://www.mediafire.com/?nh7mx7bxqht9ovu
    Edited by: 891355 on Nov 6, 2011 1:35 PM

  • Error reading wsdl file excepetion null

    Hi
    I am trying to invoke a proxy service (web service) wsdl from a bpel process. When i add a web service adapter, put url of external web service and save it, all my service end points defined in the BPEL process are becoming non editable. Binding of operation is changing from web service to HTTP binding for all end points. When I try to edit any partner link, Jdev throws an error " error reading wsdl file excepetion null " for local services. For external service, even though i am refering to a url on the server, it points to " C:\Oracle\Middleware\jdeveloper\jdev\bin\...\xxxx?WSDL" and throws same error " failed to read wsdl file(System could not find the path specified". I am just clueless as to why this is happening. Any help is much appreciated.

    Try the SOA Forum - SOA Suite

  • \\Error Reading Rules File when dimbuild with DLR

    Hi
    I am using Essbase 11.1.2.1.
    I create a DLR via the web console EAS (11.1.2.1 too) : a very simple one : dimbuild DLR, ";" as separator, 2 fields (parent and child)
    when i try do do a "Update Ouline..." with a very simple file (1 line : accounts;test) I have this error message "\\Error Reading Rules File"
    I don't know if it can help but if I create the same DLR on another 7.1 essbase serveur through this same wec eas console (11.1.2.1), I have no problem...
    another information, too : my 11.1.2.1 server has a //ESS_LOCALE English_UnitedStates.Latin1@Binary ESSLANG. My 7.1 server has a //ESS_LOCALE French_France.ISO-8859-15@Default ESSLANG. I really don't know if there is a link, or absolutely not.
    Thanks in advance for your help!
    Fanny

    unable to load essmsh.exe : the error message seems to indicate that it is a problem with a path in the environment variables.
    So if you say that the "Error Reading Rules File" is typically a path issue, all is probably linked!
    The admin will probably correct that tomorrow : I let you know if it solves the problem!
    Thanks!
    Fanny

  • Error reading product file driver files

    When attempting apply a large merge patch I receive the following error:
    Screening out files not valid for this installation...
    Determining valid on-site files...
    AutoPatch error:
    The following file is missing:
    /oracle/prodappl/pa/11.5.0/admin/driver/pasb038.drv
    AutoPatch error:
    Error reading product file driver files [complete; make tapes]
    AutoPatch error:
    Error determining valid on-site files
    Any ideas?
    I've tried using options=noprereq option, but that didn't help.

    - Try to restore the file from a backup you have Or just copy it from any other environment.
    - Make sure that you have included all pre-req patches in the merged file.
    I've tried using options=noprereq optionBy this you tell adpatch not to check for pre-req, use 'options=prereq' instead.

  • Error reading zip file in Java 6

    We have a bespoke installer program that fails, intermittently, in Java 6 on Windows. After installing some files, it then fails with a stack trace like this:
    java.util.zip.ZipException: error reading zip file
         at java.util.zip.ZipFile.read(Native Method)
         at java.util.zip.ZipFile.access$1200(ZipFile.java:29)
         at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:447)
         at java.util.zip.ZipFile$1.fill(ZipFile.java:230)
         at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141)
         at java.io.FilterInputStream.read(FilterInputStream.java:90)
         at com.XXXX.trent.installer.Installer.writeStreamToFile(Unknown Source)
         at com.XXXX.trent.installer.Installer.installFile(Unknown Source)
         at com.XXXX.trent.installer.PatchFileInstaller.installFile(Unknown Source)
         at com.XXXX.trent.installer.PatchFileInstaller.installFiles(Unknown Source)
         at com.XXXX.trent.installer.UpgradeInstaller$TpfAction.run(Unknown Source)
         at com.XXXX.trent.installer.UpgradeInstaller.runActions(Unknown Source)
         at com.XXXX.trent.installer.UpgradeInstaller.install(Unknown Source)
         at com.XXXX.trent.installer.TrentInstall$SoftwareInstallStage.install(Unknown Source)
         at com.XXXX.trent.installer.TrentInstall$UpgradeInstallWorker.install(Unknown Source)
         at com.XXXX.trent.installer.PatchInstall$InstallWorker.construct(Unknown Source)
         at com.XXXX.trent.utils.SwingWorker$2.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:619)The same code works in Java 5 on the same environments that it now fails in Java 6 (1.6.0_16).
    Any ideas?
    Thanks.

    gimbal2 wrote:
    it is not weird, it is a bug in the application. Don't let the upgrade from Java 5 to Java 6 make you believe otherwise.It's a singularly bad exception message though. I would have thought that something from java.util might be a bit more explicit about what the problem is.
    Winston

  • Error reading project file : no protocol

    I have followed the instructions exactly as in the j2ee tutiorial ,but, when I run asant , an error occurs:
    : Error reading project file : no protocol: ../../common/targets.xml
    Urgent!

    Could you please provide a bit more detail such as which sample you are using? Also are you using the latest version of the tutorial and have you configured your build.properties in the samples/common directory?

  • Error reading Maya file

    I was trying to import a camera into AE, but I encounted the error: AEGP Plugin MayaImport: Error reading Maya file. (5027::12)
    Here's how I did:
    Version of softwares:
    Maya 2014 and 2013
    After Effects CS6
    System:
    Windows 7 & Mac OS 10.6.8
    I exported Camera and locator from a maya(.mb) file and save it as a .ma file. I baked all keyables of the camera.
    Then I tried to import it into AE. and the error occured.
    I tried different versions of maya and different systems, as I mentioned above. But the results were the same.
    Does anybody know how to fix it? Or show me another way to import Maya's camera into AE?
    Thanks!

    Without seeing the actual Maya file nobody can say anything. Could simply need a manual editing of the file version info or some reformatting...
    Mylenium

  • Error reading/writing file "com.garageband.cs":`≤Ć». message

    Hey all! Don't know if anyone can help but I keep getting the message...
    " Error reading/writing file "com.garageband.cs":`≤Ć». " with a cancel button.
    If you click on it it does go away, but after a time playback starts skipping and stuff.
    Anyone help please?
    Thanks
    Righini

    first two things to try for “oddball” probs:
    http://www.bulletsandbones.com/GB/GBFAQ.html#oddballprobs
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • Error reading/writing file message when opening garageband and/or files

    I've been recently getting this message when I open garageband and files
    "Error reading/writing file\U201Ccom.apple.garageband.cs\U201D
    I've been in and repaired disk permissions and all that it says it is all fine, reinstall garageband and message still comes up, weird.
    not only is garageband being a nuisance, Mac OS X 10.6.2 is being a pain when shutting down telling me to restart the computer. This only happened since upgrading to 10.6. No one as yet knows this promble so I'm gonna have to ring apple and see what is going on here.
    and also my other problem is that mac doesn't seem as snappy anymore I noticed this before upgrading to 10.6 and made no difference when "cleanly" installing 10.6. I get a colour wheel popping up and i'm having to wait with simple tasks. iMac only 2 years old.

    i give up with this discussion forum no no one knows anything

Maybe you are looking for

  • My iPhone 6 128gb keep freezing and shutting down

    Need help to solve freezing problem with my 128gb iPhone 6

  • Sproxy and abap mapping

    Hi All, 1.how can i get the data into sproxy(application system) from integration builder(integration server)?. 2.how to do setting in TC SM59 for http destination for this? 3.pls give abap mapping scenario Thanks & Regards,

  • Can't sync Imac (Ical) with Ipad2 (calendar)

    Since a few days I can't longer sync my Imac calendar with my Ipad. Before it always worked perfectly. Th only thing that's changed is an update of Itunes (11.0). Could this be the rout-cause? How can I solve it? Before, when I added something in my

  • ORA-01041

    I get the following error when my application accesses the database. ORA-01041 ORA-01041 internal error. HOSTDEF extension does not exist Cause: The pointer to the HOSTDEF extension in HOSTDEF is null How do i rectify this error. Any help would be ap

  • Which version of JDBC works with Oracle 7.3.3 for NT?

    I use Oracle 7.3.3. It seems I can not use a JDBC to connect to it. Anyone know which version of JDBC I should use? Thanks in advance. Tony Luo [email protected]