Search code examples
excelcoldfusioncoldfusion-9cfspreadsheet

cfspreadsheet fails to read empty rows


  1. Given a spreadsheet with N logical rows
  2. Where one row is totally blank*
  3. cfspreadsheet action="read" will return a query with a RecordCount of N - 1.

*A totally blank row is a row where every cell is actually blank. See CELL_TYPE_BLANK in the POI docs.

Is it possible for cfspreadsheet to include empty rows?


Solution

  • No. Since spreadsheet data is not always contiguous, <cfspreadsheet action="read" query="queryName" ...> and <cfspreadsheet action="read" format="csv|html" ..> deliberately screen out blank rows to avoid including tons of white space noise. So unless a row has at least one non blank cell, it will not be detected. AFAIK, there is no setting to override that behavior. You would have to tap into the underlying POI workbook and roll-your-own.