Skip to main content
Inspiring
February 7, 2011
Question

Remove extra empty rows from excel - cfspreadsheet

  • February 7, 2011
  • 1 reply
  • 3175 views

Hi all,

I am testing an excel file reader, and the spreasheet tag brings the empty rows as well. How would I prevent empty rows?

I have 10 rows in excel once I run the this tag it brings 60 more rows(empty rows), and the rowcound becomes 70..

<cfspreadsheet action="read"

src="#form.UPLOADFILE#"

query="myQuery">

<cfdump var="#myQuery#">

This topic has been closed for replies.

1 reply

Inspiring
February 7, 2011

It's impossible to tell, based on what you've given us.  I imagine there is SOME data in the rows you are saying are empty, even if it's a space in the 70th row, or some formatting or something.  This is more likely than CFSPREADSHEET just magicking them out of thin air.

It might pay to export the XLS as CSV data or HTML or something and have a look at why there are more rows than you think.

--

Adam

emmim44Author
Inspiring
February 7, 2011

I dumped that spreadsheet var it shows the empty rows as well. Is there a way to eliminate those empty rows in fly while reading it from?

Inspiring
February 8, 2011

It might not be quite what you want, but you can do a Q of Q to get rid of them after the fact.