Skip to main content
Participant
July 9, 2015
Question

Error in spreadsheet cell

  • July 9, 2015
  • 1 reply
  • 331 views

Disclaimer, I'm just barely past beginner CF developer.

I am using cfspreadsheet to open an Excel document and read some values from the first sheet. It blows up with "An error occurred while reading the Excel: org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException" and specifically "</font> does not close tag <br>."

I've Googled left and right trying to find good material on Reading/Writing Excel with CF but not really finding much. Here's what I have:

<cfspreadsheet action="read" src="#theFile#" sheet="1" query="data">

Besides not knowing exactly how to read what I need from that (yet) I can't get that far because it crashes. Specifically I need to read B2, E2, B3, E3, B4, E4, B5, E5, B6 and E6.

Anyway, this particular spreadsheet has 9 sheets, but I only need to read those values for sheet 1. The problem is in sheet 5, column M1 there is a button that has text that wraps and says Reset Data. I KNOW that if I remove the word Data from it, then I can read it. However, I'm not going to have the luxury of doing that. It's spreadsheet is set in stone and I can't change it. And it will be used by hundreds of people. So I have to find a way to import this, read those values and move on.

Help???

    This topic has been closed for replies.

    1 reply

    BKBK
    Community Expert
    Community Expert
    July 11, 2015

    <cfspreadsheet action="read" src="#theFile#" sheet="1" query="data">

    Might ColdFusion be confusing the word 'data' with the name of the query variable? Test this idea by changing that line to, say,

    <cfspreadsheet action="read" src="#theFile#" sheet="1" query="spreadSheetData">