Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

Commented Unassigned: DataRange.RowCount when no data in table [9408]

$
0
0
Hi,

I think there is a weird behavior in IXLDataTable.DataRange.RowCount().

My code:
var dataRange = worksheetMain.Range(cellTableStart, cellTableEnd);
var tableMData = dataRange.AsTable();

fileTotalRecords = tableMData.DataRange.RowCount();

If the original range contains:
1 header row
+2 data rows

The RowCount is 2.

If the range contains:
1 header row
+ No data

The RowCount is 1.

Looks like a bug?
Or is there an explanation?
Comments: It gives the wrong output so it's a bug.

Viewing all articles
Browse latest Browse all 1877

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>