We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Nulls in Cells Collection

I am trying to use .Net Cells to dynamically import data from uploaded spreadsheets to create tab delimited files. I did a proof of concept several years ago in Aspose cells for Java.

In some uploads there are 'blank' columns for data like address-row-3, or zip4 for instance. If I use IEnumerator to scan the cells, sometimes the 'blank' data appears as an empty string - "" - but other times the column seems to be missing. The Cells Enumerator seems to totally ignore these 'empty' cells.

I tried using my own loop control for column index and Row..GetCellOrNull(loop-index) - and debugged. During this process I found that in the blank columns, sometimes I am returned a Cell of type IsNull=true. Other times I am returned only a 'null'- that is, I do not get a Cell object reutrned at all.

This situation is not like what used to happen in the old Java version.

My validation logic always expects a Cell will be returned from a 'GetCellxxxxx' method against a Cell Collection. It handles the concept of Cell of type null, but does not handle the return of nothing/null;

I do not understand why the cells are missing in the enumerator or why the GetCellxxx() methods do not return a 'new' Cell of type null or something;

Before I change a lot of code....am I missing something here, or is this a difference in the current Aspose logic?


Sometimes, you get empty string and sometimes you get nulls because it happens there are cells which has only style set and not data set.