cfspreadsheet 无法读取空行
- 给定一个包含 N 个逻辑行的电子表格
- ,其中一行完全空白*
cfspreadsheet action="read"
将返回RecordCount
为 N - 1 的查询。
*完全空白row 是每个单元格实际上都是空白的行。请参阅 POI 文档中的 CELL_TYPE_BLANK。
cfspreadsheet
是否可以包含空行?
- Given a spreadsheet with N logical rows
- Where one row is totally blank*
cfspreadsheet action="read"
will return a query with aRecordCount
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不会。由于电子表格数据并不总是连续的,
和
故意筛选掉空白行,以避免包含大量空白噪声。因此,除非一行至少有一个非空白单元格,否则不会检测到它。 AFAIK,没有设置可以覆盖该行为。您必须利用底层 POI 工作簿并自行构建。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.我设置了一个像这样的 xls:
并在其上运行了以下代码:
输出是:
这就是我所期望的。
所以在我看来,空白行受到了很好的尊重......?
我和你做的有什么不同?
I set up an xls like this:
And ran this code over it:
And the output was:
Which is what I'd expect.
So it looks to me like the blank rows are respected just fine...?
What am I doing different from you?