Question

Excel Reading Empty Worksheet Returns One Feature


Badge +2

Hi

 

I’m finding when reading an Excel Worksheet containing only headers in Row 1 and no other data that I have one feature read with <missing> values for all columns.

Surely if there are no rows there should be no features read?

Process:

New Excel Workbook containing one Worksheet and create the header in row 1 as follows:

In cell A1 enter MyCol1 and use the right arrow to store that value in the cell and move to cell B1.

Enter in cell B1 MyCol2 and use the left arrow to return to cell A1.

This ensures that no other cells have been interacted with.

Read this Workbook with an Excel reader and it returns one feature with missing values for MyCol1 and MyCol2.

If you actually have data in row 2 you also get one feature read correctly.

Thanks


2 replies

Userlevel 3
Badge +18

I think I would rather have 1 Feature with missing Attributes than no Features at all. Don't know if I would count it as a bug. If you have an empty sheet you at least can do something with the Attributes created.

 

It would be good practice to use a Tester behind the Reader to test for Attributes that have the values you need. Excel Readers sometimes output more Empty rows because there once was data on the row.

 

But maybe more users see this as a bug?

Badge +2

It’s inconsistent behaviour to other formats where a table or class is empty and no features are returned. I could filter on empty rows but I have 30 worksheets in my situation.

Reply