2 Replies Latest reply on Nov 28, 2012 3:39 PM by Jackie_C

    Error reading Excel file


      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
      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
      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!
        • 1. Re: Error reading Excel file
          Brett R-Oracle
          Hi Chris,

          I know you mention you are working with simple text columns, but it might be worth double-checking if there is a formula lurking there somewhere, which is in-error. Perhaps start with an empty spreadsheet with just a few rows/columns from your original spreadsheet.

          • 2. Re: Error reading Excel file
            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.