Skip to content

Null check for GetCellError()#485

Merged
andersnm merged 2 commits into
ExcelDataReader:developfrom
RRobbins94:patch-1
Oct 3, 2020
Merged

Null check for GetCellError()#485
andersnm merged 2 commits into
ExcelDataReader:developfrom
RRobbins94:patch-1

Conversation

@RRobbins94

Copy link
Copy Markdown
Contributor

No description provided.

@andersnm

Copy link
Copy Markdown
Collaborator

Hi and thanks! Would you mind adding a test to go with this, f.eks add the following in ExcelTestBase.cs:

        [Test]
        public void GitIssue483CellErrorEmptyRow()
        {
            // Check there are four rows with no errors and no NREs
            using (var reader = OpenReader("CollapsedHide"))
            {
                reader.Read();
                Assert.AreEqual(null, reader.GetCellError(0));
                Assert.AreEqual(null, reader.GetCellError(1));

                reader.Read();
                Assert.AreEqual(null, reader.GetCellError(0));
                Assert.AreEqual(null, reader.GetCellError(1));

                reader.Read();
                Assert.AreEqual(null, reader.GetCellError(0));
                Assert.AreEqual(null, reader.GetCellError(1));

                reader.Read();
                Assert.AreEqual(null, reader.GetCellError(0));
                Assert.AreEqual(null, reader.GetCellError(1));
            }
        }

@andersnm

andersnm commented Sep 1, 2020

Copy link
Copy Markdown
Collaborator

FYI, I believe the error on Appveyor is harmless - apparently the build server image was upgraded since your last commit (MSBuild version 16.6.0+5ff7b0c9e updated to version 16.7.0+b89cb5fde). One of the changes is a Nuget warning I've ignored has become an error

@andersnm andersnm merged commit 8c170da into ExcelDataReader:develop Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants