Skip to content

DYN-8615 OpenXML Excel Exception #16185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

RobertGlobant20
Copy link
Contributor

@RobertGlobant20 RobertGlobant20 commented Apr 30, 2025

Purpose

Fixing problem with the Data.OpenXMLImportExcel node sending the exception "Object reference not set to an instance of an object.".
Probably this error is based in how the excel spreadsheet was created (by some reason is counting empty rows as if they contains data but if you copy the info to a new excel sheet it works as expected) but basically the problem is that when the spreadsheet contains empty rows sometimes the Row.LastChild is null so the "Object reference not set to an instance of an object." exception is generated when trying to check any property inside the Cell instance. For fixing this problem I just added a validation that will skip the empty row if Row.LastChild is null.

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated
  • This PR contains no files larger than 50 MB

Release Notes

Fixing problem with the Data.OpenXMLImportExcel node sending the exception "Object reference not set to an instance of an object.".

Reviewers

@zeusongit @DynamoDS/eidos

FYIs

@achintyabhat

Probably this error is based in how the excel spreadsheet was created but basically the problem is that when the spreadsheet contains empty rows sometimes the LastChild is null so the  "Object reference not set to an instance of an object." exception is generated when trying to check any property inside the Cell instance.
For fixing this problem I just added a validation that will skip the empty row if Row.LastChild is null.
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-8615

@RobertGlobant20
Copy link
Contributor Author

GIF created AFTER my fix
DynamoSandbox_bONdC1APTh

@RobertGlobant20
Copy link
Contributor Author

GIF created BEFORE my fix
DynamoSandbox_dSbkqrdisB

@RobertGlobant20
Copy link
Contributor Author

@zeusongit any comment about this change?

@zeusongit zeusongit merged commit f3cad63 into DynamoDS:master May 5, 2025
27 checks passed
@zeusongit zeusongit added this to the 3.5.1 milestone May 9, 2025
@zeusongit
Copy link
Contributor

/cherrypick

github-actions bot pushed a commit that referenced this pull request May 16, 2025
Copy link

Successfully created backport PR for RC3.5.1_master:

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